/* ==========================================================
   Online Admission Wizard — mindu theme
   Scoped to .admission-wizard on the front admission page
   ========================================================== */

.admission-wizard {
    position: relative;
}

/* ---------- Stepper progress bar ---------- */
.wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    border: 1px solid rgba(17, 24, 39, 0.06);
    overflow-x: auto;
}

.wizard-nav li {
    position: relative;
    flex: 1 1 130px;
    min-width: 130px;
    text-align: center;
    padding: 18px 12px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wizard-nav li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -2px;
    width: calc(100% - 44px);
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 0;
}

.wizard-nav li .step-dot {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 700;
    font-size: 16px;
    line-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: 2px solid #e5e7eb;
    transition: all 0.25s ease;
}

.wizard-nav li .step-dot i {
    display: none;
    font-size: 15px;
}

.wizard-nav li .step-label {
    display: block;
    font-family: var(--tp-ff-heading);
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.2;
}

.wizard-nav li .step-sub {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.wizard-nav li.active .step-dot {
    background: var(--tp-theme-1);
    border-color: var(--tp-theme-1);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.wizard-nav li.active .step-label { color: var(--tp-theme-1); }

.wizard-nav li.done .step-dot {
    background: var(--tp-theme-1);
    border-color: var(--tp-theme-1);
    color: #fff;
}

.wizard-nav li.done .step-dot i { display: inline-block; }

.wizard-nav li.done .step-dot span { display: none; }

.wizard-nav li.done:not(:last-child)::after { background: var(--tp-theme-1); }

.wizard-nav li.done .step-label { color: #111827; }

.wizard-nav li.has-error .step-dot {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

.wizard-nav li.has-error .step-label { color: #dc2626; }

/* ---------- Step panels ---------- */
.wizard-step {
    display: none;
    animation: wizardFade 0.3s ease;
}

.wizard-step.active { display: block; }

@keyframes wizardFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wizard-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

.wizard-card .wizard-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(90deg, #f8fafc, #ffffff);
}

.wizard-card .wizard-card-head .wizard-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: var(--tp-theme-1);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.wizard-card .wizard-card-head h4 {
    margin: 0;
    font-family: var(--tp-ff-heading);
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.wizard-card .wizard-card-head p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.wizard-card .wizard-card-body {
    padding: 28px;
}

@media (max-width: 767px) {
    .wizard-card .wizard-card-head { padding: 16px 18px; }
    .wizard-card .wizard-card-body { padding: 18px; }
}

/* ---------- Instructions step ---------- */
.wizard-instr-p {
    font-family: var(--tp-ff-heading);
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-left: 4px solid var(--tp-theme-1);
    border-radius: 0 10px 10px 0;
    margin-bottom: 10px;
}
.wizard-instr-p:last-child { margin-bottom: 0; }

/* ---------- Compact form controls inside the wizard ---------- */
#admissionWizard .onlineform .form-control {
    padding: 7px 12px !important;
    font-size: 14px !important;
    border-radius: 5px !important;
    line-height: 1.4 !important;
    height: auto !important;
    box-shadow: none !important;
}

/* ---------- Compact form controls inside the check-status modal ---------- */
#checkOnlineAdmissionStatus .onlineform .form-control {
    padding: 8px 12px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
    height: auto !important;
    box-shadow: none !important;
}

/* ---------- Datepicker ---------- */
.ui-datepicker { z-index: 1070; }

/* ---------- Review panel ---------- */
.wizard-review { display: none; }
.wizard-review.show { display: block; }

/* ---------- File upload entries (dedicated upload step) ---------- */
.wizard-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.wizard-upload-box {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7ff 100%);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.wizard-upload-box::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tp-theme-1), var(--tp-common-red));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.wizard-upload-box:hover {
    border-color: var(--tp-theme-1);
    background: linear-gradient(135deg, #eef2ff 0%, #e8eeff 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.wizard-upload-box:hover::before { opacity: 1; }

.wizard-upload-box .wizard-upload-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-upload-box .wizard-upload-title i {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-theme-1);
    font-size: 14px;
    transition: background 0.2s ease;
}

.wizard-upload-box:hover .wizard-upload-title i {
    background: var(--tp-theme-1);
    color: #fff;
}

/* ---------- Review panel ---------- */
.wizard-review .review-section {
    margin-bottom: 22px;
}

.wizard-review .review-section h5 {
    font-family: var(--tp-ff-heading);
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    border-bottom: 2px solid var(--tp-theme-1);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 10px;
}

.wizard-review .review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 20px;
}

.wizard-review .review-row {
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.wizard-review .review-key {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: block;
}

.wizard-review .review-val {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.wizard-review .review-val.empty { color: #9ca3af; font-weight: 400; }

/* ---------- Wizard actions (prev / next / submit) ---------- */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 18px 0 4px;
}

.wizard-actions .wizard-actions-left { display: flex; gap: 10px; }

.wizard-btn {
    border: none;
    border-radius: 50px;
    padding: 11px 26px 13px;
    font-family: var(--tp-ff-heading);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-btn-prev {
    background: #fff;
    border: 1px solid rgba(31, 36, 46, 0.2);
    color: var(--tp-common-black);
}

.wizard-btn-prev:hover { border-color: var(--tp-theme-1); color: var(--tp-theme-1); }

.wizard-btn-next, .wizard-btn-submit {
    background: var(--tp-theme-1);
    color: var(--tp-common-white);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.wizard-btn-next:hover, .wizard-btn-submit:hover {
    background: var(--tp-common-red);
    color: var(--tp-common-white);
}

.wizard-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.wizard-step-counter {
    font-size: 13px;
    color: #6b7280;
    margin-left: auto;
    padding: 0 14px;
    white-space: nowrap;
}

/* ---------- Error highlighting ---------- */
.wizard-step .form-group.has-wizard-error input,
.wizard-step .form-group.has-wizard-error select,
.wizard-step .form-group.has-wizard-error textarea {
    border-color: #dc2626;
}

.wizard-error-notice {
    display: none;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
}

.wizard-error-notice.show { display: block; }

/* ---------- Instructions step ---------- */
.wizard-instructions {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
}

.wizard-instructions h1, .wizard-instructions h2, .wizard-instructions h3, .wizard-instructions h4 {
    margin-top: 0;
}

/* ---------- Print / fallback ---------- */
@media print {
    .wizard-nav, .wizard-actions, .wizard-btn, .wizard-step-counter { display: none !important; }
    .wizard-step { display: block !important; page-break-inside: avoid; }
    .wizard-step.active { animation: none; }
}