/* First Destination Survey styles */

:root {
    --fds-rail-width: 25rem;
}

#fds-input-page,
#fds-result-page {
    font-size: 14px;
}

/* Component: Modern Table */
.table-modern {
    border-spacing: 0;
    width: 100%;
    margin-top: 1rem;
    background: #fff;
    border: 1px solid #e3e6eb;
}

.table-modern thead th {
    background-color: #1e2736;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-modern tbody tr {
    background-color: #fff;
}


.table-modern tbody td {
    padding: 0.5rem 0.65rem;
    vertical-align: middle;
    border: 1px solid #d2d4d8;
    color: #1f2937;
    font-size: 0.875rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
}

/* Component: Pill Toggle */
.btn-toggle-group {
    background: #f3f4f6;
    padding: 0.3rem;
    display: inline-flex;
    border-radius: 999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #c0c0c0;
}

.btn-toggle {
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-toggle:hover {
    color: #000;
}

.btn-toggle.active {
    background: var(--ucf-gold-soft);
    background-color: #ffe894;
    border: 1px solid #ffc904;
    color: var(--ucf-black);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

/* Component: Input Fields */
.form-select-modern {
    border: 1px solid #d1d5db;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #2d3748;
    background-color: #fff;
    box-shadow: none;
}

.form-select-modern:focus {
    border-color: var(--ucf-gold);
    box-shadow: 0 0 0 4px rgba(255, 201, 4, 0.15);
    outline: none;
}

/* Layout Helpers */
.fds-page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.25rem 0.5rem 2rem;
}

.fds-page-header {
    margin-bottom: 1rem;
}

.fds-page-header h1 {
    font-size: 1.75rem;
    color: var(--ucf-black);
}

.fds-section-heading {
    margin-bottom: 0.75rem;
    font-size: 14px;
    color: black;
}

.fds-field-label {
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
}


.fds-control-bar {
    margin-bottom: 1.25rem;
    padding: 1.1rem;
    border: 1px solid #e1e6ee;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fds-dashboard-layout {
    display: grid;
    grid-template-columns: var(--fds-rail-width) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.fds-dashboard-rail {
    min-width: 0;
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.fds-dashboard-rail-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fds-dashboard-main {
    min-width: 0;
}

.fds-control-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.fds-control-summary {
    font-size: 0.9rem;
    color: #5f6b7a;
    line-height: 1.4;
}

.fds-control-actions {
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
}

.fds-control-body {
    display: grid;
    grid-template-columns: var(--fds-rail-width) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
}

.fds-filter-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.fds-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(11rem, 1fr));
    gap: 0.85rem;
    align-items: end;
}

.fds-filter-row-actions {
    grid-template-columns: minmax(18rem, 1fr) repeat(2, minmax(10rem, auto)) minmax(11.5rem, auto);
    align-items: end;
}

.fds-filter-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}

.fds-filter-field {
    min-width: 0;
}

.fds-action-btn {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 1rem;
    align-self: end;
    white-space: nowrap;
}

.fds-new-search-btn {
    margin-left: 0.35rem;
    border: 1px solid #111827;
    background: #111827;
    color: #fff;
    font-weight: 700;
}

.fds-new-search-btn:hover,
.fds-new-search-btn:focus {
    border-color: var(--ucf-gold-deep);
    background: var(--ucf-gold);
    color: var(--ucf-black);
}

.fds-active-summary {
    width: 100%;
    border: 1px solid #e1e6ee;
    background: #f8fafc;
    padding: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fds-active-summary::before {
    content: "Current Selection";
    display: block;
    margin-bottom: 0.65rem;
    font-size: 14px;
}

.fds-summary-item {
    display: grid;
    grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-top: 1px solid #edf0f4;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #1f2937;
}

.fds-summary-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.fds-summary-item:last-child {
    padding-bottom: 0;
}

.fds-summary-item strong {
    color: #6b7280;
    font-weight: 700;
}

.fds-results-layout {
    display: grid;
    grid-template-columns: var(--fds-rail-width) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.fds-category-sidebar {
    width: 100%;
    min-width: 0;
    background-color: #f8fafc;
    border: 1px solid #e1e6ee;
}

.fds-category-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 0px;

}

.fds-category-sidebar-inner>.fds-section-heading {
    background-color: black;
    color: white;
    margin-bottom: 0;
    padding: 0.5rem 1rem;
}

.fds-category-nav {
    display: flex;
    flex-direction: column;
}

.fds-category-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #4894fd;
    line-height: 1.35;
    font-size: 0.875rem;
    transition: background 0.1s ease, color 0.1s ease;
}

.fds-category-link:hover {
    background: #f4f6f8;
}

.fds-category-link.is-active {
    background: #ffd000;
    border-left-color: var(--ucf-gold);
    color: #1a1a1a;
}

.fds-category-link-text {
    display: block;
}

.fds-results-pane {
    min-width: 0;
}

.fds-response-rate-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid #dbe2ea;
    border-left: 4px solid #0284c7;
    border-radius: 0px;
    background: #cfe6f6;
    color: #1f2937;
    font-size: 0.88rem;
    line-height: 1.45;
}

.fds-response-rate-banner i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: #0284c7;
}

.fds-response-rate-banner-text {
    min-width: 0;
}

.fds-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0d6efd;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.fds-link-button:hover,
.fds-link-button:focus {
    color: #0a58ca;
}

.fds-inline-note {
    display: flex;
    gap: 0.65rem;
    align-items: baseline;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.85rem;
    background: #fafbfc;
    border: 1px solid #dbe2ea;
    border-left: 3px solid #94a3b8;
    color: #425466;
    font-size: 0.86rem;
    line-height: 1.45;
}

.fds-inline-note-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.fds-inline-note-text {
    min-width: 0;
}

.fds-empty-state {
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--ucf-gold);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.fds-no-respondents {
    line-height: 1.55;
}

.fds-no-respondents-question {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.fds-helper-list {
    padding-left: 1.1rem;
    color: #4b5563;
}

.fds-helper-list li+li {
    margin-top: 0.75rem;
}

.fds-level-badge {
    display: inline-flex;
    align-items: center;
    height: fit-content;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--ucf-gold-soft);
    color: #7a5a00;
    font-size: 0.75rem;
    font-weight: 700;
}

.fds-loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.78);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.fds-loading-gif {
    width: 60px;
    height: auto;
    display: block;
}

.fds-report-notice {
    display: flex;
    gap: 0rem;
    align-items: flex-start;
    padding: 0.45rem 0 0.6rem;
    margin-bottom: 0;
    border: 0;
    color: #4b5563;
}

.fds-report-notice-label {
    flex: 0 0 auto;
    padding: 0.05rem 0;
    color: white;
    background-color: rgb(41, 142, 230);
    padding: 3px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fds-report-notice-body {
    line-height: 1.45;
    font-size: 0.85rem;
    padding: 0px 6px 3px 6px;
}

.fds-report-notice-body strong {
    color: #374151;
}

/* FDS report generation diagnostics (Level 1 scope + skipped labels) */
.fds-diagnostics-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.fds-diagnostics-banner {
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #1f2937;
}

.fds-diagnostics-banner--info {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left: 4px solid #0284c7;
}

.fds-diagnostics-banner--warn {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 4px solid #d97706;
}

.fds-diagnostics-banner-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: #111827;
}

.fds-diagnostics-banner-text {
    font-size: 0.86rem;
    color: #4b5563;
}

.fds-diagnostics-skipped-list {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.fds-diagnostics-skipped-list li {
    margin-bottom: 0.25rem;
}

.fds-report-table {
    table-layout: auto;
    min-width: 100%;
}

.fds-report-table-profiled {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}

.fds-table-profile-ratingMatrix .fds-numeric-header-cell {
    white-space: normal;
    line-height: 1.2;
}

.fds-table-profile-flat .fds-numeric-header-cell,
.fds-table-profile-groupedSummary .fds-numeric-header-cell,
.fds-table-profile-multivariate .fds-metric-header {
    white-space: normal;
    line-height: 1.2;
}

.fds-report-section {
    background: #fff;
    margin-bottom: 1rem;
}

.fds-report-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 5px;
}

.fds-report-section-intro {
    min-width: 0;
    flex: 1;
}

.fds-report-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.fds-report-table-wrap {
    padding-bottom: 1rem;
}

.fds-report-table-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 1rem 0.65rem;
}

.fds-back-to-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #c8ced8;
    background: #fff;
    color: #263238;
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.2;
    font-weight: 600;
}

.fds-back-to-top-btn:hover,
.fds-back-to-top-btn:focus-visible {
    border-color: #7a6a27;
    color: #111;
    background: #fff8dc;
}

.fds-back-to-top-btn:focus-visible {
    outline: 2px solid #b39b2f;
    outline-offset: 2px;
}

.fds-report-footer {
    padding: 0 1rem 0.9rem;
    margin-top: 0;
}

.fds-table-header-cell,
.fds-group-header,
.fds-metric-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    vertical-align: middle;
}

.fds-row-header-cell {
    text-align: left !important;
    min-width: 140px;
}

.fds-count-cell,
.fds-percent-cell {
    text-align: center !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    min-width: 65px;
}

.fds-numeric-header-cell,
.fds-metric-header {
    text-align: center !important;
    white-space: nowrap;
    line-height: 1.25;
    min-width: 65px;
}



.fds-count-column,
.fds-percent-column {
    min-width: 65px;
}

.fds-row-label-cell {
    text-align: left !important;
    color: #243041;
    vertical-align: top;
    line-height: 1.4;
    min-width: 140px;
}

.fds-group-header {
    text-align: center !important;
    font-weight: 700;
    white-space: nowrap;
}

.fds-metric-header {
    text-align: center;
    font-size: 0.72rem;
    vertical-align: middle;
}

.fds-group-divider {
    border-right: 1px solid rgba(17, 17, 17, 0.12);
}

.fds-total-row td {
    background: #ffd000 !important;
    font-weight: 600;
}

/* .fds-total-row td count and percent cells */
.fds-total-row td.fds-count-cell,
.fds-total-row td.fds-percent-cell {
    background: #ffd000 !important;
    color: #1a1a1a !important;
}

.fds-report-table td,
.fds-report-table th {
    vertical-align: middle;
}

.fds-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.fds-report-table .fds-row-label-cell,
.fds-report-table .fds-row-header-cell {
    white-space: normal;
    word-break: normal;
}

.fa-sort.text-muted.opacity-25 {
    opacity: 0.08 !important;
    transition: opacity 0.15s ease;
}

th[role="button"]:hover .fa-sort.text-muted.opacity-25,
th[role="button"]:focus .fa-sort.text-muted.opacity-25 {
    opacity: 0.22 !important;
}

@media (max-width: 768px) {
    .fds-page-shell {
        padding: 1rem 0.4rem 1.5rem;
    }

    .fds-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .fds-dashboard-rail {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .fds-control-bar {
        padding: 0.9rem;
        border-radius: 10px;
    }

    .fds-control-body {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .fds-filter-row {
        grid-template-columns: 1fr;
    }

    .fds-filter-row.fds-filter-row-actions {
        grid-template-columns: 1fr;
    }

    .fds-new-search-btn {
        margin-left: 0;
    }


    .fds-results-layout {
        grid-template-columns: 1fr;
    }

    .fds-report-section-header {
        flex-direction: column;
    }

    .fds-report-table-wrap,
    .fds-report-footer,
    .fds-report-table-actions,
    .fds-report-section-header {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    .fds-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .fds-dashboard-rail {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .fds-control-body {
        grid-template-columns: 1fr;
    }

    .fds-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fds-filter-row-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fds-new-search-btn {
        margin-left: 0;
    }

    .fds-results-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
    }
}

/* Question navigation and exports remain visible on small screens. */
.fds-question-navigation { display: grid; gap: .6rem; padding: 1rem; margin-bottom: 1rem; background: #fff9df; border: 1px solid #d9c879; border-radius: .6rem; }
.fds-question-navigation label { font-weight: 600; }
.fds-question-navigation select { max-width: 100%; }
.fds-report-table-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.fds-report-section:focus { outline: 3px solid #946b00; outline-offset: 3px; }
[hidden] { display: none !important; }
