
/* General Styles */
th {
    cursor: pointer;
}
.highlight {
    background-color: #ffcccc;
}
.navbar-nav .nav-link {
    cursor: pointer;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.restricted-height {
    max-height: 800px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
}
.main-container {
    background-color: white;
    opacity: 1;
    border-radius: 5px;
}
.table th, .table td {
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}
.table-sm th, .table-sm td {
    padding: 0.3rem;
}

/* KPI Card Grid (mobile only) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
}
.kpi-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}
.kpi-card .kpi-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.kpi-card .kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

/* Sort direction indicator on sortable headers */
th[onclick]::after {
    content: ' \2195';
    font-size: 10px;
    opacity: 0.4;
}

/* Column label switching: short by default, full on desktop or landscape mobile */
.col-full { display: none; }
.col-short { display: inline; }

@media (min-width: 769px), (max-width: 768px) and (orientation: landscape) {
    .col-short { display: none; }
    .col-full { display: inline; }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .table {
        display: block;
        overflow-x: auto;
        width: 100%;
        margin: 0 auto;
    }

    .table thead, .table tbody, .table tr {
        width: 100%;
    }

    .table th, .table td {
        white-space: normal;
        font-size: 14px;
        padding: 8px 6px;
    }

    .table th, .table td {
        border-bottom: 1px solid #ddd;
    }

    /* Hide secondary columns on mobile */
    .hide-on-mobile {
        display: none !important;
    }

    .navbar-brand {
        font-size: 16px;
    }

    .nav-link {
        font-size: 14px;
    }

    /* Touch-friendly nav */
    .nav-tabs .nav-link {
        min-height: 44px;
        padding: 10px 14px;
    }

    .main-container {
        padding: 8px;
        margin-top: 8px !important;
    }

    /* Remove restrictive max-height on mobile */
    .restricted-height {
        max-height: none;
        overflow-y: visible;
        border: none;
        padding: 0;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }

    /* Prevent iOS zoom on form focus */
    .form-select {
        font-size: 16px;
        padding: 12px;
    }

    /* Pick-a-box mobile sizing */
    .main-image {
        width: 60%;
        display: block;
        margin: 0 auto;
    }

    .surrounding-images {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }

    .surrounding-images h3 {
        font-size: 1.2rem;
        margin: 0 10px;
    }

    .surrounding-images img {
        width: 20%;
    }

    /* Mobile tab label */
    .tab-full-label {
        display: none;
    }
}

/* Desktop: hide short labels, show full labels */
@media (min-width: 769px) {
    .tab-short-label {
        display: none;
    }

    .main-image {
        width: 40%;
    }

    .surrounding-images img {
        width: 20%;
    }

    .surrounding-images h3 {
        font-size: 1.2rem;
    }
}
