/**
 * school-modal.css - Styled school selector modal.
 *
 * Palette matches the NGP header/footer: navy #172f41 body, orange #eb931f
 * accent (same tokens style.css uses for .pre-header / .footer). Enqueued by
 * inc/ngp/school-modal.php only on pages that render the modal.
 */

.ngp-school-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(23, 47, 65, 0.75);
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ngp-school-modal-overlay.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ngp-school-modal {
    background: #fff;
    width: 100%;
    max-width: 520px;
    margin: 6vh auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: ngpSchoolModalIn 0.2s ease-out;
}

@keyframes ngpSchoolModalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ngp-school-modal__header {
    background: #172f41;
    color: #fff;
    padding: 22px 24px;
    text-align: center;
    position: relative;
}

.ngp-school-modal__logo img {
    max-width: 150px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

.ngp-school-modal__title {
    color: #fff;
    font-size: 22px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ngp-school-modal__subtitle {
    color: #eb931f;
    font-size: 14px;
    margin: 6px 0 0;
}

.ngp-school-modal__close {
    display: none; /* auto-open (gated pages) hides the close; page fallback shows it via .is-dismissible */
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

.ngp-school-modal__close:hover { opacity: 1; }

.ngp-school-modal-overlay.is-dismissible .ngp-school-modal__close { display: block; }

.ngp-school-modal__body {
    padding: 24px;
}

.ngp-school-modal__current {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #f4f7f9;
    border: 1px solid #e3e8ec;
    border-radius: 4px;
    font-size: 15px;
}

.ngp-school-modal__current-label {
    color: #7b8894;
}

.ngp-school-modal__current-name {
    font-weight: 600;
    color: #172f41;
}

.ngp-school-modal__clear {
    margin-left: auto;
    color: #172f41;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.ngp-school-modal__clear:hover {
    color: #eb931f;
}

.ngp-school-modal__label {
    display: block;
    font-weight: 600;
    color: #172f41;
    margin-bottom: 8px;
    font-size: 15px;
}

.ngp-school-modal__search {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 2px solid #d7dde2;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 14px;
    outline: none;
}

.ngp-school-modal__search:focus {
    border-color: #eb931f;
}

.ngp-school-modal__list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e3e8ec;
    border-radius: 4px;
}

.ngp-school-modal__list li {
    margin: 0;
}

.ngp-school-modal__option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #eef1f3;
    padding: 12px 16px;
    font-size: 15px;
    color: #172f41;
    cursor: pointer;
}

.ngp-school-modal__option:hover,
.ngp-school-modal__option:focus {
    background: #f4f7f9;
    color: #172f41;
}

.ngp-school-modal__option[hidden] { display: none; }

.ngp-school-modal__empty {
    padding: 16px;
    text-align: center;
    color: #7b8894;
    font-size: 14px;
}

.ngp-school-modal__footnote {
    font-size: 12px;
    color: #7b8894;
    margin: 0;
    text-align: center;
}

.ngp-school-modal__footnote a { color: #172f41; text-decoration: underline; }
