/* Fair Practices Code */

.fair-practices-page {
    --fair-navy: var(--page-text);
    --fair-orange: #f58220;
    --fair-paper: var(--page-bg);
    --fair-muted: rgba(var(--ink), 0.65);
    --fair-border: rgba(var(--ink), 0.1);
    padding-bottom: min(24vh, 200px);
}

.fair-practices-section {
    padding: 3.5rem 0;
}

.fair-practices-panel {
    padding: 1.5rem;
    border: 1px solid var(--fair-border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 16px 36px rgba(24, 37, 68, 0.06);
}

.fair-practices-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.fair-practices-panel-head .section-header {
    margin-bottom: 0;
}

.fair-practices-panel-head .ir-year-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.fair-practices-panel-head label {
    color: var(--fair-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.fair-practices-documents {
    min-height: 4rem;
    /* Roughly five document rows before the list starts scrolling */
    max-height: 29rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 37, 68, 0.28) transparent;
}

.fair-practices-documents::-webkit-scrollbar {
    width: 6px;
}

.fair-practices-documents::-webkit-scrollbar-track {
    background: transparent;
}

.fair-practices-documents::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(24, 37, 68, 0.28);
}

.fair-practices-documents .pdf_file {
    background: var(--fair-paper);
}

.fair-practices-documents .document-texts {
    min-width: 0;
}

/* Only widen the text column while the row is still horizontal; below this the
   row stacks and a flex-basis would act as a height. */
@media (min-width: 576px) {
    .fair-practices-documents .document-texts {
        flex: 1 1 22rem;
    }
}

.fair-practices-documents .document-texts h3 {
    margin: 0 0 0.25rem;
    color: var(--fair-navy);
    font-family: var(--font-display, Outfit, sans-serif);
    font-size: calc(1rem * var(--a11y-font-scale, 1));
    font-weight: 700;
    line-height: 1.4;
}

.fair-practices-documents .document-texts p {
    margin: 0;
    color: var(--fair-muted);
    font-size: 0.84rem;
}

.fair-practices-status {
    min-height: 0;
    color: var(--fair-muted);
    font-size: 0.9rem;
}

.fair-practices-status:not(:empty) {
    margin-bottom: 1rem;
}

.fair-practices-empty {
    padding: 2.5rem 1rem;
    border: 1px dashed var(--fair-border);
    border-radius: 12px;
    background: var(--fair-paper);
    color: var(--fair-muted);
    text-align: center;
}

@media (max-width: 767px) {
    .fair-practices-section {
        padding: 2.5rem 0;
    }

    .fair-practices-panel {
        padding: 1.15rem;
    }

    .fair-practices-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .fair-practices-panel-head .ir-year-wrap,
    .fair-practices-panel-head .ir-year-select {
        width: 100%;
    }

    .fair-practices-documents {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}
