/* ── School search widget ── */
.msf-school-input-wrap {
    position: relative;
}
.msf-school-input-wrap input[type="text"] {
    width: 100%;
}
.msf-school-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding: 0;
}
.msf-school-dropdown li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.msf-school-dropdown li:last-child { border-bottom: none; }
.msf-school-dropdown li:hover,
.msf-school-dropdown li:focus { background: #f0f6ff; }

.msf-dd-name { display: block; font-weight: 600; color: #1a1a2e; }
.msf-dd-meta { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }

/* ── Manual-entry row (inline "type your school" at bottom of dropdown) ── */
.msf-dd-manual {
    background: #f8faff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 12px 11px;
    cursor: default;
}
.msf-dd-manual:hover { background: #f0f4ff; }

.msf-dd-manual-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 7px;
}

.msf-dd-manual-row {
    display: flex;
    gap: 7px;
    align-items: center;
}

.msf-dd-manual-input {
    flex: 1;
    height: 34px;
    padding: 0 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
    outline: none;
    transition: border-color .15s;
}
.msf-dd-manual-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.msf-dd-manual-btn {
    height: 34px;
    padding: 0 14px;
    background: #5046e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.msf-dd-manual-btn:hover { background: #4338ca; }

/* ── Confirmed state (school locked in) ── */
input.msf-confirmed {
    border-color: #22c55e !important;
    background: #f0fdf4;
    color: #15803d;
}

/* ── Phone wrapper ── */
.msf-phone-row, .msf-school-row { display: none; }

/* ── Error ── */
input.msf-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important; }

/* ── When no schools are found, soften the dropdown border-radius at top ── */
.msf-school-dropdown:has(.msf-dd-manual:first-child) {
    border-radius: 0 0 8px 8px;
}

/* ── Confirmed state tweak — also clear red error on re-focus ── */
input.msf-error:focus { box-shadow: 0 0 0 3px rgba(99,102,241,.12) !important; border-color: #6366f1 !important; }
