/*
 * admission-steps.css
 * ASADI Application Portal — Multi-Step Form Styles
 * Uses existing site variables: $PC (#F07339), $BLACK (#111111), Inter font.
 * Add this file after theme.min.css.
 *
 * Usage:
 *   <link href="assests/site/css/admission-steps.css?ver=1.000" rel="stylesheet">
 */


 /* ─────────────────────────────────────────────
   CSS VARIABLES (mirrors SCSS variables)
───────────────────────────────────────────── */
:root {
    --adm-pc:        #F07339;
    --adm-pc-hover:  #D8612A;
    --adm-black:     #111111;
    --adm-white:     #ffffff;
    --adm-gray1:     #dcdcdc;
    --adm-gray2:     #e0e0e0;
    --adm-gray3:     #e8e8e8;
    --adm-gray4:     #f0f0f0;
    --adm-gray5:     #f5f5f5;
    --adm-gray6:     #f8f8f8;
    --adm-success:   #198754;
    --adm-danger:    #dc3545;
    --adm-radius:    12px;
    --adm-radius-sm: 8px;
    --adm-shadow:    0 2px 16px rgba(17,17,17,.07);
    --adm-shadow-lg: 0 8px 32px rgba(17,17,17,.12);
    --adm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* ─────────────────────────────────────────────
   STEP PROGRESS BAR
───────────────────────────────────────────── */
/* Zero-height scroll anchor — scroll-margin-top offsets for fixed navbar */
#adm-step-top {
    scroll-margin-top: 80px;
}

.adm-progress {
    padding: 0 8px;
    margin-bottom: 2.5rem;
    position: relative;
}

.adm-progress__track {
    position: absolute;
    top: 20px;
    left: calc(10% + 20px);
    right: calc(10% + 20px);
    height: 3px;
    background: var(--adm-gray2);
    border-radius: 2px;
    z-index: 0;
    overflow: hidden;
}

.adm-progress__fill {
    height: 100%;
    background: var(--adm-pc);
    border-radius: 2px;
    width: 0;
    /* animated via JS */
}

.adm-progress__steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.adm-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 8px;
}

.adm-progress__dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--adm-white);
    border: 2px solid var(--adm-gray2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    transition: var(--adm-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.adm-progress__step.is-done .adm-progress__dot {
    background: var(--adm-pc);
    border-color: var(--adm-pc);
    color: var(--adm-white);
}

.adm-progress__step.is-active .adm-progress__dot {
    background: var(--adm-black);
    border-color: var(--adm-black);
    color: var(--adm-white);
    box-shadow: 0 4px 16px rgba(17,17,17,.2);
    transform: scale(1.1);
}

/* Clickable completed step dots */
a.adm-progress__dot {
    text-decoration: none;
    color: inherit;
}

a.adm-progress__dot.adm-dot-link {
    cursor: pointer;
}

.adm-progress__step.is-done a.adm-progress__dot.adm-dot-link:hover {
    background: var(--adm-pc-hover);
    border-color: var(--adm-pc-hover);
    color: var(--adm-white);
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(240,115,57,.35);
}

.adm-progress__label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #aaa;
    text-align: center;
    line-height: 1.3;
    max-width: 72px;
    transition: var(--adm-transition);
}

.adm-progress__step.is-active .adm-progress__label {
    color: var(--adm-black);
    font-weight: 700;
}

.adm-progress__step.is-done .adm-progress__label {
    color: var(--adm-pc);
}

/* ─────────────────────────────────────────────
   STEP CARD
───────────────────────────────────────────── */
.adm-step-card {
    background: var(--adm-white);
    border: 1px solid var(--adm-gray2);
    border-radius: var(--adm-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--adm-shadow);
    margin-bottom: 2rem;
}

.adm-step-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--adm-gray3);
}

.adm-step-card__number {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--adm-pc);
    line-height: 1;
    min-width: 56px;
    letter-spacing: -1px;
}

.adm-step-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--adm-black);
    margin: 0 0 4px;
    line-height: 1.2;
}

.adm-step-card__sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #888;
    margin: 0;
}

/* ─────────────────────────────────────────────
   FORM CONTROLS — override Bootstrap floating
───────────────────────────────────────────── */
.admission-form .form-floating > .form-control,
.admission-form .form-floating > .form-select {
    border: 1.5px solid var(--adm-gray1);
    transition: var(--adm-transition);
}



.admission-form .form-floating > .form-control.is-invalid,
.admission-form .form-floating > .form-select.is-invalid {
    border-color: var(--adm-danger);
    background: #fff8f8;
}

.invalid-feedback.adm-field-error {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--adm-danger);
    margin-top: 4px;
    padding-left: 4px;
}

/* Textarea height */
.admission-form textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ─────────────────────────────────────────────
   GROUP FIELDS (bordered sections like Father/Mother)
───────────────────────────────────────────── */
.group-field {
    border: 1.5px solid var(--adm-gray2);
    border-radius: var(--adm-radius-sm);
    overflow: hidden;
    background: var(--adm-white);
    transition: var(--adm-transition);
}


.group-field .head-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--adm-black);
    background: var(--adm-gray4);
    border-bottom: 1.5px solid var(--adm-gray2);
    border-left: 3px solid var(--adm-pc);
    padding: 9px 14px;
}

/* Fix theme.min.css overriding form-floating with display:grid */
.group-field .form-floating {
    display: block !important;
    position: relative !important;
    margin-bottom: 0 !important;
}

/* Restore Bootstrap floating-label behaviour that the theme breaks */
.group-field .form-floating > .form-control {
    height: calc(3.5rem + 2px) !important;
    min-height: calc(3.5rem + 2px) !important;
    padding: 1rem 0.75rem 0.25rem !important;
    line-height: 1.25 !important;
}

.group-field .form-floating > label {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 1rem 0.75rem !important;
    pointer-events: none !important;
    border: 1px solid transparent !important;
    transform-origin: 0 0 !important;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    opacity: 1;
    transform: none;
    margin: 0 !important;
}

/* Floated state: when input has a value or is focused */
.group-field .form-floating > .form-control:focus ~ label,
.group-field .form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65 !important;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
}

/* row/col layout inside group-field */
.group-field .grp-row {
    border-bottom: 1.5px solid var(--adm-gray3);
}

.group-field .grp-row--last {
    border-bottom: none;
}

.group-field .grp-col:not(:last-child) {
    border-right: 1.5px solid var(--adm-gray1);
}

.group-field .grp-row .form-floating > .form-control {
    border: none;
    border-radius: 0;
    background: var(--adm-white);
    box-shadow: none;
}

.group-field .grp-row .form-floating > .form-control:focus {
    border: none !important;
    background: var(--adm-white);
    box-shadow: none;
    outline: none;
}

/* Remove bottom border on last input-group row */
.group-field .input-group:last-child .form-floating > .form-control {
    border-bottom: none;
}

/* Month / Year select dropdowns — override theme's aggressive padding */
.group-field .input-group .form-select {
    font-size: 13px !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.group-field .input-group .input-group-text {
    font-size: 13px;
    background-color: var(--adm-gray5);
    border-color: var(--adm-gray1);
    color: #555;
    border-radius: 0;
}

/* ─────────────────────────────────────────────
   COMPLETION RING (top-right of step header)
───────────────────────────────────────────── */
.adm-completion-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.adm-ring-track {
    fill: none;
    stroke: var(--adm-gray2);
    stroke-width: 5;
}

.adm-ring-fill {
    fill: none;
    stroke: var(--adm-pc);
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 36px 36px;
    transition: stroke-dashoffset 0.6s ease;
}

.adm-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.adm-ring-pct {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--adm-black);
}

.adm-ring-sub {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 500;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

/* ─────────────────────────────────────────────
   STEP NAVIGATION (Back / Save & Continue)
───────────────────────────────────────────── */
.adm-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1.5px solid var(--adm-gray3);
    gap: 1rem;
    flex-wrap: wrap;
}

.adm-step-nav.justify-content-end {
    justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   INFO BOX (account already exists notice)
───────────────────────────────────────────── */
.adm-info-box {
    background: #fff7f3;
    border: 1.5px solid #fcd5be;
    border-radius: var(--adm-radius-sm);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #7a3a1a;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.adm-info-box a {
    color: var(--adm-pc);
    font-weight: 600;
    text-decoration: none;
}

.adm-info-box a:hover {
    color: var(--adm-pc-hover);
    text-decoration: underline;
}

/* ─────────────────────────────────────────────
   BORDER HELPERS (group field connectivity)
───────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .border-bottom-0-mobile {
        border-bottom: 1.5px solid var(--adm-gray3) !important;
    }
}

@media (max-width: 575.98px) {
    /* Stack grp-col fields to full width (mobile → email → others = 3 rows) */
    .group-field .grp-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        border-right: none !important;
    }
    /* Add separator between stacked cols inside the same grp-row */
    .group-field .grp-col:not(:last-child) {
        border-bottom: 1.5px solid var(--adm-gray3);
    }
}

/* ─────────────────────────────────────────────
   BUTTONS — extend existing .btn-black
───────────────────────────────────────────── */
.btn-black {
    background: var(--adm-black);
    color: var(--adm-white);
    border: 2px solid var(--adm-black);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    padding: 12px 28px;
    border-radius: var(--adm-radius-sm);
    transition: var(--adm-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-black:hover,
.btn-black:focus {
    background: var(--adm-pc);
    border-color: var(--adm-pc);
    color: var(--adm-white);
    box-shadow: 0 4px 16px rgba(240,115,57,.3);
    transform: translateY(-1px);
}

.btn-black:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-secondary {
    background: transparent;
    color: #666;
    border: 2px solid var(--adm-gray1);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 12px 28px;
    border-radius: var(--adm-radius-sm);
    transition: var(--adm-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-outline-secondary:hover {
    background: var(--adm-gray4);
    border-color: #bbb;
    color: var(--adm-black);
}

.adm-btn-edit {
    background: transparent;
    color: var(--adm-pc);
    border: 2px solid var(--adm-pc);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 12px 28px;
    border-radius: var(--adm-radius-sm);
    transition: var(--adm-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.adm-btn-edit:hover,
.adm-btn-edit:focus {
    background: var(--adm-pc);
    border-color: var(--adm-pc);
    color: var(--adm-white);
    box-shadow: 0 4px 16px rgba(240,115,57,.3);
    transform: translateY(-1px);
    text-decoration: none;
}

.adm-btn-logout {
    background: transparent;
    color: var(--adm-danger);
    border: 2px solid var(--adm-danger);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 12px 28px;
    border-radius: var(--adm-radius-sm);
    transition: var(--adm-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.adm-btn-logout:hover,
.adm-btn-logout:focus {
    background: var(--adm-danger);
    border-color: var(--adm-danger);
    color: var(--adm-white);
    box-shadow: 0 4px 16px rgba(220,53,69,.25);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Smaller logout button used in progress bar */
.adm-btn-logout--sm {
    font-size: 0.78rem;
    padding: 6px 14px;
    gap: 4px;
}

/* ─────────────────────────────────────────────
   APPLICATION SUCCESS PAGE
───────────────────────────────────────────── */
.adm-success-check {
    background: var(--adm-pc);
    color: #fff;
    font-size: 22px;
    padding: 20px;
    border-radius: 35px;
    line-height: 1;
}

.adm-success-table {
    font-size: 14px;
}

.adm-success-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.adm-success-table th:first-child {
    width: 42%;
}

.adm-success-appno {
    color: var(--adm-pc);
}

.adm-success-table .badge {
    font-size: 13px;
}

/* ─────────────────────────────────────────────
   SUCCESS PAGE — outline button overrides
   (ensures border is always visible and hover
    keeps text readable regardless of theme)
───────────────────────────────────────────── */
.adm-step-card .btn-outline-primary {
    color: var(--adm-pc) !important;
    border: 2px solid var(--adm-pc) !important;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: var(--adm-transition);
    text-decoration: none;
}

.adm-step-card .btn-outline-primary:hover,
.adm-step-card .btn-outline-primary:focus {
    background: var(--adm-pc) !important;
    border-color: var(--adm-pc) !important;
    color: #fff !important;
    text-decoration: none;
}

.adm-step-card .btn-outline-danger {
    color: var(--adm-danger) !important;
    border: 2px solid var(--adm-danger) !important;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: var(--adm-transition);
    text-decoration: none;
}

.adm-step-card .btn-outline-danger:hover,
.adm-step-card .btn-outline-danger:focus {
    background: var(--adm-danger) !important;
    border-color: var(--adm-danger) !important;
    color: #fff !important;
    text-decoration: none;
}

/* ─────────────────────────────────────────────
   CUSTOM CHECKBOX (reuse existing .check-- pattern)
───────────────────────────────────────────── */
.custom-check-- .check-- {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    padding-left: 32px;
    cursor: pointer;
    display: block;
    position: relative;
    user-select: none;
}

.custom-check-- .check-- input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-check-- .check-- .checkmark {
    position: absolute;
    top: 3px;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--adm-gray1);
    border-radius: 4px;
    background: var(--adm-white);
    transition: var(--adm-transition);
}

.custom-check-- .check-- input:checked ~ .checkmark {
    background: var(--adm-pc);
    border-color: var(--adm-pc);
}

.custom-check-- .check-- .checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: 2px solid var(--adm-white);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.custom-check-- .check-- input:checked ~ .checkmark::after {
    display: block;
}

/* ─────────────────────────────────────────────
   FILE INPUT POLISH
───────────────────────────────────────────── */
.admission-form input[type="file"].form-control {
    padding-top: 1.5rem;
    cursor: pointer;
}

.adm-img-preview {
    display: block;
}

/* ─────────────────────────────────────────────
   ALERTS
───────────────────────────────────────────── */
.admission-form .alert {
    border-radius: var(--adm-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    border-left: 4px solid;
}

.admission-form .alert-danger {
    border-left-color: var(--adm-danger);
    background: #fff5f5;
    color: #8b1a1a;
    border-color: #f5c6c6;
}

/* ─────────────────────────────────────────────
   MANDATORY STAR
───────────────────────────────────────────── */
.admission-form .input-group .mandatory, .mandatory {
    font-size: 0.9em;
    margin-left: 2px !important;
    width: auto !important;
    display: inline !important;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .adm-step-card {
        padding: 1.5rem 1rem;
    }

    .adm-progress__label {
        font-size: 9px;
        max-width: 54px;
    }

    .adm-progress__dot {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    .adm-progress__track {
        top: 16px;
    }
}

@media (max-width: 575.98px) {
    /* Switch header to grid: [number | title] on row 1, ring on row 2 */
    .adm-step-card__header {
        display: grid !important;
        grid-template-columns: auto 1fr;
        gap: 0.25rem 0.75rem;
        align-items: start;
    }

    /* Row 1 col 1: number */
    .adm-step-card__number {
        grid-column: 1;
        grid-row: 1;
        font-size: 2rem;
        min-width: 44px;
    }

    /* Row 1 col 2: title + sub */
    .adm-step-card__header > div:not(.adm-completion-ring) {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    /* Row 2: ring spans both columns, centered, element stays 72×72 so label sits inside */
    .adm-step-card__header .adm-completion-ring {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-left: 0 !important;
        justify-self: center;
        width: 72px;
        height: 72px;
    }

    .adm-step-card__title {
        font-size: 1.2rem;
    }

    .adm-step-nav {
        flex-direction: column-reverse;
    }

    .adm-step-nav .btn {
        width: 100%;
        justify-content: center;
    }

    .adm-progress__label {
        display: none; /* hide labels on very small screens */
    }
}

/* ─────────────────────────────────────────────
   NATA BROCHURE BUTTON ALIGNMENT
───────────────────────────────────────────── */
.adm-step-card .btn-black.btn-md,
.adm-step-card .btn-outline-secondary.btn-md {
    min-width: 140px;
}

/* ─────────────────────────────────────────────
   LOADING SPINNER (keep existing site style)
───────────────────────────────────────────── */
#loadingDiv {
    z-index: 9999;
    opacity: 0.85;
}