/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* International Directory / Requirements Page Styles */

.requirements-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.requirements-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    display: block;
}

.requirements-page-title::before {
    content: "";
    display: block;
    width: 3rem;
    height: 4px;
    background-color: #c5050c;
    margin-bottom: 0.5rem;
}

.requirements-intro {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.requirements-section {
    margin-bottom: 2.5rem;
}

.requirements-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid #c5050c;
}

.requirements-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.requirements-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.requirements-section ul,
.requirements-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.requirements-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Country Selector */
.country-selector {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #f7f7f7;
    border-left: 4px solid #c5050c;
}

.country-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.country-selector select {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Country Data Display */
.intdir-data-field {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.intdir-data-field p {
    margin-bottom: 1rem;
}

.intdir-data-field p:last-child {
    margin-bottom: 0;
}

.intdir-data-field strong {
    color: #121212;
}

/* Test Scores Table */
.test-scores {
    margin: 1rem 0;
    list-style: none;
    padding-left: 0;
}

.test-scores li {
    display: flex;
    justify-content: space-between;
    max-width: 700px;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.test-scores li span:first-child {
    white-space: nowrap;
}

.test-scores li span:last-child {
    text-align: right;
}

.test-scores li:last-child {
    border-bottom: none;
}

/* Translation Note */
.translation-note {
    margin-top: 1rem;
}

/* Mailing Address */
.mailing-address,
.contact-address {
    font-style: normal;
    margin: 0.75rem 0 0.75rem 1rem;
    padding: 0.75rem;
    background-color: #f7f7f7;
    border-left: 3px solid #c5050c;
}

.contact-address a {
    color: #0479a8;
    text-decoration: none;
}

.contact-address a:hover {
    text-decoration: underline;
}

/* Accordion */
.accordion {
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: #f7f7f7;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    transition: background-color 0.2s ease;
}

.accordion-toggle:hover {
    background-color: #eee;
}

.accordion-toggle[aria-expanded="true"] {
    background-color: #e4e4e4;
    border-bottom: 1px solid #ddd;
}

.accordion-icon {
    font-size: 1.25rem;
    font-weight: bold;
    color: #c5050c;
    transition: transform 0.2s ease;
}

.accordion-toggle[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 1.25rem;
    background-color: #fff;
}

.accordion-content[hidden] {
    display: none;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content ol {
    padding-left: 1.5rem;
}

.accordion-content ol li {
    margin-bottom: 0.75rem;
}

/* Focus styles for accessibility */
.country-selector select:focus,
.accordion-toggle:focus {
    outline: 2px solid #0479a8;
    outline-offset: 2px;
}

.accordion-content a:focus {
    outline: 2px solid #0479a8;
    outline-offset: 2px;
}

/* Live region for dynamic content */
.intdir-data-field[aria-live] {
    /* Styling handled by existing rules */
}

/* Responsive */
@media only screen and (max-width: 768px) {
    .requirements-page {
        padding: 1rem;
    }

    .requirements-page-title {
        font-size: 1.5rem;
    }

    .requirements-section h2 {
        font-size: 1.1rem;
    }

    .requirements-section h4 {
        font-size: 1rem;
    }

    .country-selector {
        padding: 1rem;
    }

    .country-selector select {
        max-width: 100%;
    }

    .test-scores li {
        max-width: 100%;
        flex-direction: column;
        gap: 0.125rem;
    }

    .test-scores li span:first-child {
        white-space: normal;
    }

    .test-scores li span:last-child {
        text-align: left;
    }

    .mailing-address,
    .contact-address {
        margin-left: 0;
    }

    .accordion-toggle {
        padding: 0.75rem 1rem;
    }

    .accordion-content {
        padding: 1rem;
    }
}

@media only screen and (max-width: 480px) {
    .requirements-page-title {
        font-size: 1.25rem;
    }

    .country-selector select {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .intdir-data-field {
        padding: 1rem;
    }
}
