/* ── Wigmorean Admissions — Form Styles ─────────────────────────── */
:root {
    --adm-cream:   #f6f7f7;
    --adm-crimson: #2271b1;
    --adm-gold:    #646970;
    --adm-brown:   #1d2327;
    --adm-border:  #e0d5c5;
    --adm-radius:  8px;
}

.wig-adm-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: Calibri, 'Segoe UI', sans-serif;
    color: var(--adm-brown);
}

/* Progress bar */
.wig-adm-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}
.wig-adm-progress::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0; right: 0;
    height: 2px;
    background: var(--adm-border);
    z-index: 0;
}
.wig-adm-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
}
.wig-adm-step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #888;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    transition: background .2s, color .2s;
}
.wig-adm-step-indicator.active .wig-adm-step-circle {
    background: var(--adm-crimson);
    color: #fff;
}
.wig-adm-step-indicator.done .wig-adm-step-circle {
    background: var(--adm-gold);
    color: #fff;
}
.wig-adm-step-indicator span {
    font-size: 11px;
    color: #888;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
}
.wig-adm-step-indicator.active span { color: var(--adm-crimson); font-weight: 600; }
.wig-adm-step-indicator.done span   { color: var(--adm-gold); }

/* Sections */
.wig-adm-section { display: none; }
.wig-adm-section.active { display: block; animation: fadeInSection .2s ease; }
@keyframes fadeInSection { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.wig-adm-section h3 {
    font-family: Georgia, serif;
    font-size: 1.4em;
    color: var(--adm-crimson);
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--adm-gold);
}
.wig-adm-section > p:first-of-type {
    color: #555;
    margin: 0 0 20px;
}

/* Notice */
.wig-adm-notice {
    background: #FDF6E3;
    border-left: 4px solid var(--adm-gold);
    padding: 12px 16px;
    border-radius: 0 var(--adm-radius) var(--adm-radius) 0;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Fields */
.wig-adm-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.wig-adm-field { display: flex; flex-direction: column; gap: 4px; }
.wig-adm-field--half { max-width: 50%; }
.wig-adm-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--adm-brown);
}
.wig-adm-field input[type="text"],
.wig-adm-field input[type="email"],
.wig-adm-field input[type="tel"],
.wig-adm-field input[type="date"],
.wig-adm-field input[type="number"],
.wig-adm-field select,
.wig-adm-field textarea {
    padding: 10px 12px;
    border: 2px solid var(--adm-border);
    border-radius: var(--adm-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--adm-brown);
    background: #fff;
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}
.wig-adm-field input:focus,
.wig-adm-field select:focus,
.wig-adm-field textarea:focus {
    outline: none;
    border-color: var(--adm-crimson);
}
.wig-adm-field small { font-size: 11px; color: #888; }
.req { color: var(--adm-crimson); }

/* Radio group */
.wig-adm-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.wig-adm-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--adm-border);
    border-radius: var(--adm-radius);
    transition: border-color .15s;
}
.wig-adm-radio-group label:has(input:checked) {
    border-color: var(--adm-crimson);
    background: #fdf6f6;
}

/* Program cards */
.wig-adm-programs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.wig-adm-program-card {
    border: 2px solid var(--adm-border);
    border-radius: var(--adm-radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    display: block;
}
.wig-adm-program-card:has(input:checked) {
    border-color: var(--adm-crimson);
    background: #fdf6f6;
}
.wig-adm-program-card input { display: none; }
.wig-adm-program-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wig-adm-program-inner strong {
    font-size: 15px;
    color: var(--adm-crimson);
    font-family: Georgia, serif;
}
.wig-adm-program-meta {
    font-size: 11px;
    color: var(--adm-gold);
    font-weight: 600;
}
.wig-adm-program-inner p {
    font-size: 13px;
    color: #555;
    margin: 4px 0 0;
    line-height: 1.4;
}

/* Payment box */
.wig-adm-payment-box {
    background: var(--adm-cream);
    border: 2px solid var(--adm-gold);
    border-radius: var(--adm-radius);
    padding: 20px;
    margin: 20px 0;
}
.wig-adm-payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    margin-bottom: 8px;
}
.wig-adm-payment-header strong {
    font-size: 1.3em;
    color: var(--adm-crimson);
}
.wig-adm-payment-note { font-size: 13px; color: #666; margin: 0 0 16px; }

/* Stripe card element */
#wig-adm-card-element {
    padding: 12px;
    border: 2px solid var(--adm-border);
    border-radius: var(--adm-radius);
    background: #fff;
    margin-top: 4px;
}
#wig-adm-card-element.focused { border-color: var(--adm-crimson); }

/* Checkbox */
.wig-adm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}
.wig-adm-checkbox-label input { margin-top: 3px; flex-shrink: 0; }

/* Review summary */
.wig-adm-summary {
    background: #f9f4ec;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.wig-adm-summary table { width: 100%; border-collapse: collapse; }
.wig-adm-summary td { padding: 5px 8px; font-size: 13px; }
.wig-adm-summary td:first-child { font-weight: 600; color: #444; width: 40%; }

/* Navigation */
.wig-adm-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--adm-border);
}
.wig-adm-btn-prev {
    background: none;
    border: 2px solid var(--adm-border);
    color: #555;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: border-color .15s;
}
.wig-adm-btn-prev:hover { border-color: var(--adm-brown); }
.wig-adm-btn-next {
    background: var(--adm-crimson);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background .15s;
    margin-left: auto;
}
.wig-adm-btn-next:hover { background: #6e1515; }
.wig-adm-btn-submit {
    background: var(--adm-gold);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: background .15s;
    margin-left: auto;
}
.wig-adm-btn-submit:hover { background: #a87f2e; }
.wig-adm-btn-submit:disabled { background: #ccc; cursor: not-allowed; }

/* Errors */
.wig-adm-error {
    color: #c0392b;
    background: #fdeaea;
    border: 1px solid #f5aaaa;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-top: 8px;
}

/* Status page */
.wig-adm-status-wrap {
    max-width: 640px;
    margin: 32px auto;
    font-family: Calibri, 'Segoe UI', sans-serif;
}
.wig-adm-status-header {
    text-align: center;
    margin-bottom: 24px;
}
.wig-adm-status-header h2 {
    font-family: Georgia, serif;
    color: var(--adm-crimson);
    margin: 0 0 4px;
}
.wig-adm-status-header p { color: #888; margin: 0; font-size: 14px; }
.wig-adm-status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid;
    border-radius: var(--adm-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #fff;
}
.wig-adm-status-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wig-adm-status-badge strong { font-size: 1.15em; }
.wig-adm-status-message {
    background: var(--adm-cream);
    border-radius: var(--adm-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}
.wig-adm-status-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.wig-adm-status-table th,
.wig-adm-status-table td { padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--adm-border); }
.wig-adm-status-table th { font-weight: 600; color: #444; width: 40%; text-align: left; background: #f9f4ec; }
.wig-adm-status-contact { text-align: center; color: #888; font-size: 13px; }
.wig-adm-status-contact a { color: var(--adm-crimson); }

/* Responsive */
@media (max-width: 640px) {
    .wig-adm-row { grid-template-columns: 1fr; }
    .wig-adm-programs { grid-template-columns: 1fr; }
    .wig-adm-field--half { max-width: 100%; }
    .wig-adm-step-indicator span { display: none; }
}

/* ── Mobile scroll fix ──────────────────────────────────────────── */
/* Force the page to be scrollable on mobile even before field focus.
   Without this, iOS/Android treats the viewport as non-scrollable
   until a form input triggers keyboard + layout recalculation. */
html {
    height: auto !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
}
body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
}
.wig-adm-wrap {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}