﻿/* Shared styles for the session tabs: Analytic Dashboard, Cost Comparison, Spec Comparison and Trip Cost Analysis.
   Layout, spacing, borders and text colours use Bootstrap utilities in the markup; this file only holds what
   Bootstrap 5.1 has no utility for: the brand colours, the card surface, Telerik overrides and the sticky table. */

:root {
    --cc-ink: #0C0055;
    --cc-text: #2b2d4a;
    --cc-muted: #6b6d85;
    --cc-border: #e4e6ef;
    --cc-divider: #eff0f5;
    --cc-subtle: #f6f7fb;
    --cc-accent: #FF7A00;
    --cc-accent-text: #B85600;
    --cc-accent-soft: #fff4e8;
}

/* Bootstrap 5.2 utility, missing from the bundled Bootstrap 5.1 */
.fw-semibold {
    font-weight: 600 !important;
}

/* Brand text utilities */
.cc-ink {
    color: var(--cc-ink) !important;
}

.cc-accent {
    color: var(--cc-accent) !important;
}

/* Calculated values */
.cc-calc {
    color: var(--cc-accent-text) !important;
}

.cc-num {
    font-family: "input-mono", monospace;
}

/* Small uppercase label above a value */
.cc-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cc-card-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cc-ink);
}

/* Surfaces */
.cc-card {
    min-width: 0;
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(12, 0, 85, 0.04);
}

.cc-hero {
    border-color: var(--cc-ink);
    background: var(--cc-ink);
    color: #fff;
}

.cc-icon-tile {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--cc-accent-soft);
    font-size: 18px;
    color: var(--cc-accent-text);
}

.cc-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 44px;
    padding: 2px;
    border-radius: 8px;
    background: var(--cc-subtle);
    object-fit: contain;
}

/* Chart colour key */
.cc-swatch {
    display: inline-block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.cc-badge-accent {
    border: 1px solid #ffd3a6;
    background: var(--cc-accent-soft);
    color: #9a4a00;
}

/* Toolbar Print / Export / Calculate buttons (Telerik buttons, overridden over the Kendo theme and app.css) */
button.telerik-blazor.k-button.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--cc-accent);
    border-radius: 8px;
    background-image: none;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

    button.telerik-blazor.k-button.cc-btn .k-button-text {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: inherit;
    }

button.telerik-blazor.k-button.cc-btn-primary {
    color: #fff;
}

button.telerik-blazor.k-button.cc-btn-outline {
    background-color: #fff;
    color: var(--cc-accent-text);
}

    button.telerik-blazor.k-button.cc-btn-outline:hover {
        background-color: var(--cc-accent-soft);
    }

/* Comparison table: sticky header row and label column, scrolling inside its card */
.cc-table-wrap {
    max-height: 75vh;
    overflow: auto;
    border: 1px solid var(--cc-border);
    border-radius: 10px;
}

    .cc-table-wrap::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .cc-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 3px;
        background: #c4c6d6;
    }

/* Cost and Spec comparison grids: a taller window and tighter rows show more rows at once */
.cc-table-wrap-tall {
    max-height: 100vh;
}

    .cc-table-wrap-tall .cc-table th.cc-label,
    .cc-table-wrap-tall .cc-table td.cc-value {
        padding-top: 7px;
        padding-bottom: 7px;
    }

.cc-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

    .cc-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        min-width: 150px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--cc-border);
        background: var(--cc-subtle);
        font-weight: 600;
        text-align: right;
        vertical-align: bottom;
        color: var(--cc-ink);
    }

    .cc-table thead th.cc-corner {
        left: 0;
        z-index: 3;
        font-size: 12px;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
        color: var(--cc-muted);
        box-shadow: inset -1px 0 0 var(--cc-border);
    }

    .cc-table th.cc-label {
        position: sticky;
        left: 0;
        z-index: 1;
        min-width: 240px;
        max-width: 320px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--cc-divider);
        background: #fff;
        font-weight: 400;
        text-align: left;
        color: var(--cc-text);
        box-shadow: inset -1px 0 0 var(--cc-border);
    }

    .cc-table td.cc-value {
        padding: 10px 14px;
        border-bottom: 1px solid var(--cc-divider);
        background: #fff;
        font-family: "input-mono", monospace;
        text-align: right;
        white-space: nowrap;
        color: var(--cc-ink);
    }

    /* Free text such as avionics wraps instead of stretching the column */
    .cc-table td.cc-value.cc-value-wrap {
        min-width: 180px;
        max-width: 260px;
        font-family: inherit;
        font-size: 13px;
        line-height: 1.4;
        text-align: left;
        white-space: normal;
    }

    .cc-table tr.cc-row:hover > th,
    .cc-table tr.cc-row:hover > td {
        background: #fafaff;
    }

    .cc-table tr.cc-group > th {
        padding: 0;
        border-bottom: 1px solid var(--cc-border);
        background: #eef0f7;
    }

        .cc-table tr.cc-group > th > span {
            position: sticky;
            left: 0;
            display: inline-block;
            padding: 9px 14px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--cc-ink);
        }

    .cc-table tr.cc-row-total > th,
    .cc-table tr.cc-row-total > td {
        border-bottom-color: var(--cc-border);
        background: #f3f2fb;
        font-weight: 600;
        color: var(--cc-ink);
    }

    .cc-table tr.cc-row-sub > th,
    .cc-table tr.cc-row-sub > td {
        padding-top: 7px;
        padding-bottom: 7px;
        background: var(--cc-subtle);
        font-size: 13px;
    }

    .cc-table tr.cc-row-sub > th {
        padding-left: 30px;
        color: var(--cc-muted);
    }

    /* Editable cells (Trip Cost Analysis) */
    .cc-table td.cc-input {
        min-width: 150px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

        .cc-table td.cc-input .k-numerictextbox {
            width: 112px;
            vertical-align: middle;
        }

    .cc-table .k-numerictextbox.myNumericTextbox {
        border: 1px solid #dcdfea !important;
        border-radius: 6px !important;
        background: #f4f5fa !important;
    }

        .cc-table .k-numerictextbox.myNumericTextbox.k-focus {
            border-color: var(--cc-accent) !important;
            background: #fff !important;
            box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15) !important;
        }

    .cc-table .myNumericTextbox .k-input-inner {
        padding: 5px 8px;
        font-family: "input-mono", monospace;
        font-size: 14px;
        text-align: right !important;
        color: var(--cc-ink);
    }

    /* Apply to all / Clear All under a row label (app.css styles these buttons with !important) */
    .cc-table button.telerik-blazor.k-button.k-button-solid.k-rounded-md.k-button-md.cc-mini-btn {
        margin: 0;
        padding: 2px 8px;
        border-radius: 6px;
        background-image: none;
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1.4;
    }

    .cc-table button.telerik-blazor.k-button.k-button-solid.k-rounded-md.k-button-md.clear-all-btn.cc-mini-btn {
        border: 1px solid var(--cc-border);
        background-color: #fff;
        color: var(--cc-muted);
    }

        .cc-table button.telerik-blazor.k-button.k-button-solid.k-rounded-md.k-button-md.clear-all-btn.cc-mini-btn:hover {
            background-color: var(--cc-subtle);
            color: var(--cc-ink);
        }

@media (max-width: 767.98px) {
    .cc-table {
        font-size: 13px;
    }

        .cc-table th.cc-label {
            min-width: 150px;
            max-width: 180px;
            padding: 8px 10px;
        }

        .cc-table thead th {
            min-width: 120px;
            padding: 10px;
        }

        .cc-table td.cc-value {
            padding: 8px 10px;
        }

        .cc-table tr.cc-row-sub > th {
            padding-left: 20px;
        }
}

/* Phones: narrower columns so the labels and about two aircraft fit side by side */
@media (max-width: 575.98px) {
    .cc-table th.cc-label {
        min-width: 120px;
        max-width: 120px;
        padding: 8px;
    }

    .cc-table thead th,
    .cc-table td.cc-value,
    .cc-table td.cc-value.cc-value-wrap,
    .cc-table td.cc-input {
        min-width: 100px;
        padding: 8px;
    }

    .cc-table td.cc-input .k-numerictextbox {
        width: 88px;
    }
}

/* Session header (Session.razor) */
.sh-band {
    background: var(--cc-ink);
}

.sh-control {
    min-width: 0;
}

.sh-edit {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transition: background 0.15s;
}

    .sh-edit:hover {
        background: var(--cc-accent);
    }

/* Session name reads as the page title until the pencil enables editing */
.sh-name .k-textbox.k-input {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #fff;
    opacity: 1;
    filter: none;
}

    .sh-name .k-textbox.k-input:not(.k-disabled) {
        border-color: rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.12);
    }

.sh-name .k-textbox .k-input-inner {
    padding: 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-overflow: ellipsis;
}

    .sh-name .k-textbox .k-input-inner::placeholder {
        color: rgba(255, 255, 255, 0.6);
        -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
    }

.sh-name .k-textbox.k-input:not(.k-disabled) .k-input-inner {
    padding: 0 8px;
}

.sh-tile-off {
    background: var(--cc-subtle);
    color: var(--cc-muted);
}

/* Imperial | Metric segmented control */
.sh-seg {
    padding: 2px;
    border-radius: 8px;
    background: var(--cc-subtle);
    box-shadow: inset 0 0 0 1px var(--cc-border);
}

    .sh-seg .btn {
        padding: 3px 6px;
        border: 0;
        border-radius: 6px !important;
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--cc-muted);
    }

        .sh-seg .btn:hover {
            color: var(--cc-ink);
        }

        .sh-seg .btn.active {
            background: var(--cc-ink);
            color: #fff;
            opacity: 1;
        }

.sh-header .k-dropdownlist {
    border-color: var(--cc-border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
}

.sh-header .k-switch-on .k-switch-track,
.sh-header .k-switch-on:hover .k-switch-track {
    border-color: var(--cc-ink);
    background-color: var(--cc-ink);
    color: #fff;
}

.sh-header .k-switch-off .k-switch-track,
.sh-header .k-switch-off:hover .k-switch-track {
    border-color: #c4c6d6;
    background-color: var(--cc-subtle);
    color: var(--cc-muted);
}

.sh-header .k-switch-off .k-switch-thumb {
    border-color: #8a8da6;
    background-color: #8a8da6;
}

/* Dividers once the settings share one row */
@media (min-width: 768px) {
    .sh-setting + .sh-setting {
        border-left: 1px solid var(--cc-divider);
    }
}

/* Print Report prints only the table; show it in full */
@media print {
    .cc-table-wrap {
        max-height: none !important;
        overflow: visible !important;
        border: 0;
    }

    .cc-table thead th,
    .cc-table th.cc-label,
    .cc-table tr.cc-group > th > span {
        position: static;
    }
}
