﻿/* Card container mimicking signup.html panel */
.registration-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    padding: 50px;
    position: relative;
}

@media (max-width: 992px) {
    .registration-card {
        padding: 28px 24px;
        margin: 0 15px;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    .registration-card {
        padding: 20px 16px;
        margin: 0 10px;
        border-radius: 10px;
    }
}

.registration-title {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
}

@media (max-width: 768px) {
    .registration-title {
        font-size: 24px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .registration-title {
        font-size: 20px;
    }
}

.muted-intro {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

@media (max-width: 768px) {
    .muted-intro {
        text-align: center;
        font-size: 13px;
    }
}

.form-step {
    display: none;
    animation: fadeStep .35s ease;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

    .form-step.active {
        display: block;
    }

@keyframes fadeStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

label.form-label,
.form-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d2d2d;
    font-size: 14px;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    display: block !important;
}

@media (max-width: 576px) {
    label.form-label, .form-label {
        font-size: 13px;
    }
}

.form-control,
.form-select {
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 12px 14px;
    transition: .25s;
    font-size: 14px;
    min-height: 48px;
}

@media (max-width: 576px) {
    .form-control, .form-select {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 52px;
    }
}

.form-control:focus,
.form-select:focus {
    border-color: #6e59a4;
    box-shadow: 0 0 0 .15rem rgba(110,89,164,0.25);
}

.form-check-input:checked {
    background-color: #6e59a4;
    border-color: #6e59a4;
}

@media (max-width: 768px) {
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

.instructions {
    background: #f6f7fb;
    border: 1px solid #e4e6ef;
    border-radius: 14px;
    padding: 18px 20px 15px;
    margin-bottom: 30px;
}

@media (max-width: 576px) {
    .instructions {
        padding: 15px 16px 12px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
}

.instructions h5 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #6e59a4;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 576px) {
    .instructions h5 {
        font-size: 14px;
    }
}

.instructions ul {
    margin: 0;
    padding-inline-start: 20px;
    font-size: 13px;
}

@media (max-width: 576px) {
    .instructions ul {
        font-size: 12px;
        padding-inline-start: 16px;
    }
}

.instructions li {
    margin-bottom: 6px;
    color: #555;
}

.subject-selection {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    cursor: pointer;
    background: #fff;
    transition: .25s;
    overflow: hidden !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

@media (max-width: 576px) {
    .subject-selection {
        padding: 12px 14px;
        margin-bottom: 12px;
        border-radius: 10px;
    }
}

.subject-selection:hover {
    border-color: #6e59a4;
    box-shadow: 0 4px 12px rgba(110,89,164,.15);
}

.subject-selection.selected {
    background: #f4f0ff;
    border-color: #6e59a4;
}

.subject-selection h6,
.subject-selection .subject-title {
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

.subject-selection p,
.subject-selection .subject-description {
    margin: 0 !important;
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

.teacher-option {
    border: 1px solid #dcdce3;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: .18s;
    cursor: pointer;
    background: #fff;
    overflow: hidden !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 576px) {
    .teacher-option {
        padding: 12px 10px;
        border-radius: 6px;
    }
}

.teacher-option:hover {
    background: #f3f0fa;
    border-color: #6e59a4;
}

.teacher-option.selected {
    background: #ebe5fa;
    border-color: #6e59a4;
    box-shadow: inset 0 0 0 2px #6e59a4;
}

.teacher-option .teacher-name,
.teacher-option strong {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

.teacher-option .teacher-details,
.teacher-option small {
    font-size: 11px !important;
    color: #777 !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* Schedule styling and overflow fix (step 4) */
#scheduleSelection,
.schedule-item,
#scheduleSelection .schedule-item {
    border: 1px solid #3f3f40 !important;
        border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
    transition: .25s;
    cursor: pointer;
    overflow: hidden !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 576px) {
    #scheduleSelection > .schedule-item,
    .schedule-item,
    #scheduleSelection .schedule-item {
        padding: 12px 10px;
        border-radius: 8px;
    }
}

#scheduleSelection > .schedule-item:hover,
.schedule-item:hover,
#scheduleSelection .schedule-item:hover {
    border-color: #6e59a4;
    background: #f7f4ff;
}

#scheduleSelection > .schedule-item.selected,
.schedule-item.selected,
#scheduleSelection .schedule-item.selected {
    border-color: #6e59a4;
    background: #efe9ff;
    box-shadow: inset 0 0 0 2px #6e59a4;
}

.schedule-item h6,
.schedule-item .schedule-title {
    margin: 0 0 6px 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

.schedule-item p,
.schedule-item .schedule-details {
    margin: 0 !important;
    font-size: 11px !important;
    color: #666 !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}
/* Alerts (unify with theme) */
.alert {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 576px) {
    .alert {
        padding: 12px 14px;
        font-size: 12px;
        border-radius: 8px;
    }
}

.alert-info {
    background: #f0f6ff;
    border-color: #c2defd;
    color: #2e4a66;
}

.alert-success {
    background: #e5fff2;
    border-color: #b9f3d7;
    color: #14633c;
}

.alert-danger {
    background: #ffe9ea;
    border-color: #ffc5ca;
    color: #892029;
}

.alert h6, .alert p, .alert span {
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* Selected subjects summary - prevent overflow */
#selectedSubjectsSummary,
#selectedSubjectsList {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

    #selectedSubjectsList .selected-subject-item {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 8px 12px;
        margin-bottom: 6px;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

/* Registration summary - prevent overflow (Step 5 fix) */
#registrationSummary {
    background: #191624;
    border: 2px solid #6e59a4;
    border-radius: 18px;
    padding: 32px 34px;
    font-size: 17px;
    color: #d1c8f6;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    width: 95% !important;
    max-width: 760px !important;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

    #registrationSummary h6,
    #registrationSummary p,
    #registrationSummary div,
    #registrationSummary .summary-label,
    #registrationSummary .summary-value {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    #registrationSummary .summary-row {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 8px;
        word-break: break-word;
    }

    #registrationSummary .summary-label {
        font-weight: 600;
        color: #6e59a4;
        margin-left: 8px;
    }

    #registrationSummary .summary-value {
        color: #333;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        max-width: 100% !important;
    }

@media (max-width: 576px) {
    #registrationSummary {
        padding: 15px 16px;
        font-size: 13px;
        border-radius: 8px;
    }

        #registrationSummary .summary-row {
            flex-direction: column;
        }

        #registrationSummary .summary-label,
        #registrationSummary .summary-value {
            flex: none;
            width: 100%;
        }
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .navigation-buttons {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 30px;
    }
}

@media (max-width: 576px) {
    .navigation-buttons {
        gap: 10px;
        margin-top: 25px;
    }
}

.btn-theme,
.btn-theme-secondary,
.btn-theme-success {
    border: none;
    border-radius: 10px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: .25s;
    background: linear-gradient(135deg,#6e59a4,#8e76d9);
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    word-wrap: break-word !important;
    word-break: keep-all !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .btn-theme, .btn-theme-secondary, .btn-theme-success {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 16px 20px;
        min-height: 52px;
    }
}

@media (max-width: 576px) {
    .btn-theme, .btn-theme-secondary, .btn-theme-success {
        font-size: 14px;
        padding: 16px 18px;
        min-height: 50px;
    }
}

.btn-theme:hover {
    box-shadow: 0 6px 18px rgba(110,89,164,.4);
    transform: translateY(-2px);
}

.btn-theme-secondary {
    background: #f1eff7;
    color: #4b3b7f;
}

    .btn-theme-secondary:hover {
        background: #e4e0f0;
    }

.btn-theme-success {
    background: linear-gradient(135deg,#2fa772,#53d392);
}

    .btn-theme-success:hover {
        box-shadow: 0 6px 16px rgba(47,167,114,.45);
        transform: translateY(-2px);
    }

#nextBtn {
    background: linear-gradient(135deg,#6e59a4,#8e76d9) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(110,89,164,0.35) !important;
}

    #nextBtn:hover {
        background: linear-gradient(135deg,#6e59a4,#8e76d9) !important;
        color: #fff !important;
        box-shadow: 0 6px 18px rgba(110,89,164,.4) !important;
        transform: translateY(-2px) !important;
    }

    #nextBtn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(110,89,164,.35);
    }

    #nextBtn:disabled {
        background: #ccc !important;
        color: #666 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
    }

        #nextBtn:disabled:hover {
            transform: none !important;
            box-shadow: none !important;
        }

/* Misc utility and layout fixes */
.security-note {
    margin-top: 25px;
    font-size: 12px;
    color: #666;
    text-align: center;
    opacity: .85;
}

@media (max-width: 576px) {
    .security-note {
        font-size: 11px;
        margin-top: 20px;
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17,16,29,.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.loading-spinner {
    background: #fff;
    padding: 34px 36px;
    border-radius: 18px;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 10px 32px rgba(0,0,0,.25);
}

@media (max-width: 576px) {
    .loading-spinner {
        padding: 24px 20px;
        min-width: 200px;
        margin: 0 20px;
        border-radius: 12px;
    }
}

.loading-spinner p {
    margin-top: 14px;
    font-size: 14px;
    color: #4b3b7f;
    font-weight: 600;
}

@media (max-width: 576px) {
    .loading-spinner p {
        font-size: 13px;
    }
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: .35em;
}

.flex-grow-1 {
    flex-grow: 1;
}

.text-purple-1 {
    color: #6e59a4;
}

.form-box-wrapper {
    background: #ffffff;
    border: 1px solid #e4e6ef;
    border-radius: 18px;
    padding: 30px 30px 38px;
    max-width: 860px;
    margin: 0 auto 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.06);
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .form-box-wrapper {
        padding: 22px 18px 30px;
        border-radius: 14px;
        margin: 0 15px 10px;
    }
}

@media (max-width: 576px) {
    .form-box-wrapper {
        padding: 18px 16px 25px;
        border-radius: 10px;
        margin: 0 10px 10px;
    }
}

.form-box-wrapper .form-step h4 {
    margin-top: 0;
}

@media (max-width: 576px) {
    .form-box-wrapper .form-step h4 {
        font-size: 16px;
    }
}
/* Header mobile responsiveness */
.header__container {
    padding: 15px 20px;
}

@media (max-width: 768px) {
    .header__container {
        padding: 12px 15px;
    }
}

.header-right__buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 992px) {
    .header-right__buttons {
        display: none;
    }
}

.language-switcher {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

@media (max-width: 576px) {
    .language-switcher {
        padding: 6px 10px;
        font-size: 13px;
    }
}

.language-switcher:hover {
    background: rgba(110, 89, 164, 0.1);
}

/* Hide decorative sidebar on mobile and tablets */
@media (max-width: 1200px) {
    .form-page__img {
        display: none !important;
    }

    .form-page__content {
        padding: 30px 0;
    }
}

@media (max-width: 576px) {
    .form-page__content {
        padding: 20px 0;
    }
}

/* Better touch targets for radio buttons and checkboxes */
.form-check {
    padding-left: 1.8em;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
}

@media (max-width: 576px) {
    .form-check {
        padding-left: 2em;
        margin-bottom: 0.8rem;
    }

    .form-check-input {
        width: 1.4em;
        height: 1.4em;
        margin-top: 0.1em;
    }
}

/* Gender options mobile layout */
.gender-options {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

@media (max-width: 576px) {
    .gender-options {
        flex-direction: column;
        gap: 12px;
    }
}

/* Fix form step header separation */
.form-step-header {
    width: 100%;
    clear: both;
    display: block;
    margin-bottom: 1.5rem;
}

    .form-step-header h4 {
        width: 100%;
        margin-bottom: 0;
    }

/* Ensure proper Bootstrap grid behavior */
.form-step .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.form-step .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    position: relative;
    width: 100%;
}

@media (max-width: 767.98px) {
    .form-step .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 0.75rem !important;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Wizard steps styling */
.registration-card .wizard-steps {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px;
    margin: 16px 0 24px;
    flex-wrap: wrap;
    width: 100%;
}

    .registration-card .wizard-steps .step {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background: #ece9f6 !important;
        color: #6e59a4 !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid #d5cdec !important;
        transition: .25s !important;
        position: relative !important;
        line-height: 1 !important;
        overflow: hidden;
    }

        .registration-card .wizard-steps .step.active {
            background: linear-gradient(135deg,#6e59a4,#8e76d9) !important;
            color: #fff !important;
            border-color: #6e59a4 !important;
            box-shadow: 0 4px 14px rgba(110,89,164,0.35) !important;
        }

        .registration-card .wizard-steps .step::before {
            content: attr(data-en);
        }

[dir="rtl"] .registration-card .wizard-steps .step::before {
    content: attr(data-ar);
}

/* Optional: small connector between steps */
.registration-card .wizard-steps .step + .step {
    position: relative;
}

    .registration-card .wizard-steps .step + .step::before {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        inset-inline-start: -10px;
        width: 12px;
        height: 2px;
        background: #d5cdec;
        border-radius: 2px;
    }

@media (max-width: 576px) {
    .registration-card .wizard-steps {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 4px;
        gap: 10px;
    }

        .registration-card .wizard-steps .step {
            width: 40px !important;
            height: 40px !important;
            flex: 0 0 40px;
        }

            .registration-card .wizard-steps .step + .step::before {
                width: 8px;
                inset-inline-start: -6px;
            }

        .registration-card .wizard-steps::-webkit-scrollbar {
            height: 6px;
        }

        .registration-card .wizard-steps::-webkit-scrollbar-thumb {
            background: rgba(110,89,164,.35);
            border-radius: 3px;
        }
}

/* SweetAlert2 Fixes */
.swal2-popup {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
    opacity: 1 !important;
}

.swal2-title, .swal2-html-container, .swal2-content {
    color: #222 !important;
    opacity: 1 !important;
}

.swal2-confirm, .swal2-styled.swal2-confirm {
    background: #e53e3e !important;
    color: #fff !important;
    opacity: 1 !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(229,62,62,0.15) !important;
    min-width: 85px;
}

.swal2-container {
    z-index: 99999 !important;
    background: rgba(30,30,30,0.4) !important;
}

.swal2-icon.swal2-error {
    font-size: 3.5em !important;
    margin: 0.5em auto 0.75em auto !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(229,62,62,0.08) !important;
}
/* RTL Layout Fixes */
[dir="rtl"] .registration-card {
    text-align: right;
}

[dir="rtl"] .registration-title {
    text-align: right;
}

[dir="rtl"] .muted-intro {
    text-align: right;
}

[dir="rtl"] .instructions {
    text-align: right;
}

    [dir="rtl"] .instructions ul {
        padding-inline-start: 0;
        padding-inline-end: 20px;
    }

[dir="rtl"] .wizard-steps {
    direction: ltr;
}

[dir="rtl"] .navigation-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-check-label {
    margin-right: 0;
    margin-left: 1.5em;
    text-align: right;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: calc(100% - 2em) !important;
}

[dir="rtl"] .d-flex.gap-4 {
    justify-content: flex-end;
}

[dir="rtl"] .form-step-header h4 {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .form-box-wrapper {
    padding: 30px;
}

[dir="rtl"] .col-md-6 {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

@media (max-width: 768px) {
    [dir="rtl"] .registration-title {
        text-align: center;
    }

    [dir="rtl"] .muted-intro {
        text-align: center;
    }
}

/* Page 4/5 schedule and summary overflow fix */
[dir="rtl"] #scheduleSelection,
[dir="rtl"] #registrationSummary,
[dir="rtl"] .form-step,
[dir="rtl"] .subject-selection,
[dir="rtl"] .teacher-option,
[dir="rtl"] .schedule-item {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

    [dir="rtl"] .form-step .row,
    [dir="rtl"] .form-step .col-md-6,
    [dir="rtl"] .form-box-wrapper,
    [dir="rtl"] #selectedSubjectsSummary,
    [dir="rtl"] #selectedSubjectsList {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

/* Prevent horizontal scrolling */
body, html {
    overflow-x: hidden !important;
}

.main-content,
.content-wrapper,
.form-page__content,
.container {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Final fallback for any stubborn overflow */
.registration-card * {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
}

* {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Specific fix for the visible teacher selection in the image */
.teacher-selection-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

    .teacher-selection-container .teacher-option {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
/* Override for Arabic text that needs to wrap */
[dir="rtl"] .teacher-option {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 28px; /* More space between cards */
}

.schedule-card {
    background: #191624;
    border-radius: 16px;
    border: 2px solid #6e59a4;
    box-shadow: 0 4px 18px rgba(110,89,164,0.14);
    padding: 18px 20px;
    margin: 0 auto;
    width: 97%;
    max-width: 510px;
    color: #d1c8f6;
    position: relative;
    display: block;
    text-align: left;
    transition: box-shadow 0.21s, border-color 0.21s, background 0.21s;
}


.schedule-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important; /* more space between cards */
    margin-top: 10px !important;
}
    .schedule-list,
    .schedule-list * {
        display: flex !important;
        flex-direction: column !important;
        gap: 0px !important; /* space between cards */
        margin-top: 6px !important;
        background: none !important;
        border:none !important;
        box-shadow: none !important;
        color: inherit !important;
        padding: 0 !important;
    }

.schedule-card,
.schedule-card ,
.schedule-option * {
    background: #191624;
    border-radius: 16px;
    border: 2px solid #6e59a4;
    box-shadow: 0 4px 18px rgba(110,89,164,0.14);
    padding: 18px 20px;
    margin: 0 auto;
    width: 97%;
    max-width: 510px;
    color: #d1c8f6;
    position: relative;
    display: block;
    text-align: left;
    transition: box-shadow 0.21s, border-color 0.21s, background 0.21s;
}


    .schedule-card:hover,
    .schedule-card:hover * {
        box-shadow: 0 12px 40px rgba(110,89,164,0.28) !important;
        border-color: #8e76d9 !important;
        background: #241a34 !important;
        background-color: #241a34 !important;
    }

    .schedule-title,
    .schedule-card .schedule-title,
    .schedule-title * {
        font-size: 17px !important;
        font-weight: 700 !important;
        color: #d1c8f6 !important;
        margin-bottom: 2px !important;
        letter-spacing: 0.03em !important;
        background: none !important;
        border: 1px solid #2c2542 !important;
            box-shadow: none !important;
        padding: 0 !important;
        display: block !important;
    }

    .schedule-details,
    .schedule-card .schedule-details,
    .schedule-details * {
        font-size: 15px !important;
        color: #b6b2c3 !important;
        margin-top: 3px !important;
        font-weight: 400 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: block !important;
    }

        .schedule-title i,
        .schedule-details i {
            margin-right: 7px !important;
            color: #8e76d9 !important;
            font-size: 16px !important;
            vertical-align: middle !important;
            background: none !important;
            border: black !important;
            border-color: grey !important;
            box-shadow: none !important;
        }

@media (max-width: 600px) {
    .schedule-card,
    .schedule-card * {
        padding: 13px 7px 10px !important;
        font-size: 14px !important;
    }

    .schedule-title,
    .schedule-title * {
        font-size: 15px !important;
    }

    .schedule-details,
    .schedule-details * {
        font-size: 13px !important;
    }

}
/* 100% isolation for registration summary from bw-theme.css */
#registrationSummary {
    isolation: isolate !important;
    position: relative !important;
    background: #fff !important;
    color: #222 !important;
    border: 2px solid #2a2a2a !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgba(110, 89, 164, 0.10) !important;
    padding: 32px 34px !important;
    font-size: 17px !important;
    max-width: 760px !important;
    margin: 0 auto 20px auto !important;
    line-height: 1.6 !important;
    all: unset !important;
    display: block !important;
    isolation: isolate !important;
    position: relative !important;
    background: #1e1d1d !important;
    color: #222 !important;
    border: 2px solid #6e59a4 !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgba(110, 89, 164, 0.10) !important;
    padding: 28px 34px !important;
    font-size: 19px !important;
    max-width: 760px !important;
    margin: 0 auto 20px auto !important;
    line-height: 2.6 !important;
    height: 420px !important; /* Set your desired height */
    max-height: 80vh !important; /* Responsive max-height if you want */
    overflow-y: auto !important;
}

    #registrationSummary * {
        all: unset !important;
        /* Now restore your intended styles to the children */
        color: #dfdddd !important;
        background: #1c1b1b !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-family: "Cairo", Arial, sans-serif !important;
        box-sizing: border-box !important;
        /* If you want more specific styles, add them below */
    }

    #registrationSummary .summary-label {
        color: #6e59a4 !important;
        font-weight: 700 !important;
        margin-left: 8px !important;
    }

    #registrationSummary .summary-value {
        color: #333 !important;
        font-weight: 500 !important;
    }

    #registrationSummary h5,
    #registrationSummary h6,
    #registrationSummary p {
        color: #6e59a4 !important;
        background: transparent !important;
        font-weight: 700 !important;
    }

    #registrationSummary .summary-row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-bottom: 10px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

@media (max-width: 576px) {
    #registrationSummary {
        padding: 15px 12px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

        #registrationSummary .summary-row {
            flex-direction: column !important;
            margin-bottom: 8px !important;
        }

        #registrationSummary .summary-label,
        #registrationSummary .summary-value {
            flex: none !important;
            width: 100% !important;
            font-size: 14px !important;
        }
}
/* Modern button toggle for registration mode (offline/online) */
.mode-toggle-group {
    display: flex;
    gap: 18px;
    margin: 18px 0 24px 0;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.mode-toggle-btn {
    background: #ece9f6;
    color: #6e59a4;
    border: none;
    border-radius: 22px;
    padding: 12px 36px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 24px rgba(110,89,164,0.08);
    transition: background 0.22s, color 0.22s, box-shadow 0.22s;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .mode-toggle-btn.active, .mode-toggle-btn:active, .mode-toggle-btn:focus {
        background: linear-gradient(135deg,#6e59a4,#8e76d9);
        color: #fff;
        box-shadow: 0 8px 28px rgba(110,89,164,0.14);
    }

    .mode-toggle-btn i {
        font-size: 20px;
    }

@media (max-width: 600px) {
    .mode-toggle-group {
        gap: 10px;
        flex-direction: row;
        justify-content: stretch;
    }

    .mode-toggle-btn {
        flex: 1 1 0;
        font-size: 15px;
        padding: 10px 8px;
        min-width: 116px;
        justify-content: center;
    }
}
#htmlRoot #validatePinAndUsernameBtn:not(.never-show) {
    all: unset !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important; /* removes from flow */
    width: 0 !important;
    height: 0 !important;
    z-index: -9999 !important;
}