/* School bus subscription portal — extends job application portal theme */

body.bs-portal {
    --bs-accent: #d97706;
    --bs-accent-dark: #b45309;
    --bs-accent-soft: rgba(217, 119, 6, 0.12);
}

body.bs-portal .bs-lang-chip {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(245, 158, 11, 0.08));
    border-color: rgba(217, 119, 6, 0.35);
    color: #92400e;
}

/* Only bus lang buttons — new_admission reuses body.bs-portal for map CSS and must not inherit orange */
body.bs-portal .ja-lang-btn.bs-lang-btn.is-active {
    background: var(--bs-accent);
    border-color: var(--bs-accent-dark);
    color: #fff;
}

.bs-hero {
    text-align: center;
    position: relative;
}

.bs-hero-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    background: linear-gradient(145deg, #f59e0b, #d97706);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.35);
}

.bs-card-head {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), transparent);
    color: #000;
}

.bs-card-head i {
    color: #000;
}

.bs-card-title {
    color: #000 !important;
    font-weight: 800 !important;
}

.bs-map-intro {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.bs-intent-notice {
    margin: 0 0 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.28);
    color: #78350f;
    font-size: 0.92rem;
    line-height: 1.85;
    font-weight: 600;
}

.bs-sadat-map {
    width: 100%;
    height: 420px;
    border-radius: 14px;
    border: 2px solid rgba(217, 119, 6, 0.25);
    overflow: hidden;
    background: #e2e8f0;
}

.bs-map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    text-align: center;
    color: #64748b;
    font-weight: 600;
}

.bs-map-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
    font-size: 0.88rem;
    font-weight: 600;
}

.bs-block-range-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #64748b;
}

.bs-sibling-students-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

.bs-sibling-students-hint {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.bs-sibling-students-actions {
    margin-top: 0;
}

.bs-sibling-students-list:not(:empty) + .bs-sibling-students-actions {
    margin-top: 0.85rem;
}

.bs-add-sibling-btn {
    width: 100%;
}

.bs-add-sibling-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bs-sibling-students-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bs-sibling-student-row {
    padding: 1rem 1.05rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 2px solid rgba(217, 119, 6, 0.18);
}

.bs-sibling-student-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.bs-sibling-student-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #92400e;
}

.bs-remove-sibling-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: none;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.bs-remove-sibling-btn:hover {
    background: rgba(239, 68, 68, 0.16);
}

.bs-combobox {
    position: relative;
}

.bs-combobox-input {
    width: 100%;
}

.bs-combobox-dropdown {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 12px;
    border: 2px solid rgba(217, 119, 6, 0.25);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.bs-combobox-dropdown.hidden {
    display: none;
}

.bs-combobox-option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    text-align: start;
    font: inherit;
    color: #0f172a;
    cursor: pointer;
}

.bs-combobox-option:hover,
.bs-combobox-option.is-active {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
}

.bs-combobox-option.is-other {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    font-weight: 700;
    color: #b45309;
}

.bs-combobox-empty {
    padding: 0.65rem 0.85rem;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.5;
}

.bs-area-custom-wrap {
    margin-top: 0.65rem;
}

.bs-sub-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
}

.bs-map-geocode-hint {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.5;
}

.bs-map-guide {
    margin: 0 0 0.85rem;
    border-radius: 14px;
    border: 2px solid rgba(217, 119, 6, 0.22);
    background: rgba(255, 251, 235, 0.72);
    overflow: hidden;
}

.bs-map-guide-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    font-weight: 800;
    color: #92400e;
    list-style: none;
    line-height: 1.45;
}

.bs-map-guide-summary::-webkit-details-marker {
    display: none;
}

.bs-map-guide-summary i {
    color: #d97706;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.bs-map-guide-summary .bs-map-guide-copy-desktop,
.bs-map-guide-summary .bs-map-guide-copy-mobile {
    flex: 1;
    min-width: 0;
}

.bs-map-guide-summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-inline-start: auto;
    margin-top: 0.15rem;
    color: #d97706;
    flex-shrink: 0;
}

.bs-map-guide[open] .bs-map-guide-summary::after {
    content: '\f077';
}

.bs-map-guide-figure {
    margin: 0;
    padding: 0 0.75rem 0.75rem;
}

.bs-map-guide-figure img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    background: #e2e8f0;
}

.bs-map-guide-figure picture {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.bs-map-guide-copy-mobile {
    display: none;
}

@media (pointer: coarse), (max-width: 720px) {
    .bs-map-guide-copy-desktop {
        display: none;
    }

    .bs-map-guide-copy-mobile {
        display: block;
    }

    .bs-sadat-map {
        height: 300px;
    }

    .bs-map-guide-figure img,
    .bs-map-guide-figure picture {
        max-width: 360px;
    }
}

.bs-map-guide-figure figcaption {
    margin-top: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #57534e;
    text-align: center;
}

.bs-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(148, 163, 184, 0.35);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.bs-terms-row.is-accepted {
    border-color: rgba(217, 119, 6, 0.55);
    background: rgba(217, 119, 6, 0.06);
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.bs-terms-check {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.bs-terms-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bs-terms-box {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 6px;
    border: 2px solid #94a3b8;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.75rem;
    transition: all 0.2s;
    margin-top: 0.15rem;
}

.bs-terms-row.is-accepted .bs-terms-box,
.bs-terms-check input:checked + .bs-terms-box {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #b45309;
    color: #fff;
}

.bs-terms-copy {
    font-size: 0.92rem;
    line-height: 1.75;
    color: #1e293b;
}

.bs-terms-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0.2rem;
    color: #b45309;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font: inherit;
}

.bs-terms-link:hover {
    color: #92400e;
}

.bs-policies-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bs-policies-modal.hidden {
    display: none;
}

.bs-policies-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(4px);
}

.bs-policies-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bs-policies-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), #fff);
}

.bs-policies-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bs-policies-close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
}

.bs-policies-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.bs-policies-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    line-height: 1.8;
    color: #334155;
    font-size: 0.92rem;
}

.bs-policies-body h3 {
    margin-top: 0;
    color: #0f172a;
}

.bs-policies-body ol {
    padding-inline-start: 1.25rem;
}

.bs-policies-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

body.bs-modal-open {
    overflow: hidden;
}

.bs-letter-block {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    line-height: 1.8;
    color: #334155;
}

.bs-letter-to {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.bs-routes-panel {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px dashed rgba(217, 119, 6, 0.45);
    background: var(--bs-accent-soft);
}

.bs-routes-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bs-routes-hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

.bs-routes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bs-route-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(217, 119, 6, 0.25);
    font-size: 0.8rem;
}

.bs-route-name {
    font-weight: 700;
    color: #78350f;
}

.bs-route-bus {
    color: #64748b;
    font-size: 0.75rem;
}

.bs-route-suggest-hint {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: #0369a1;
    line-height: 1.45;
}

.ja-glass-card.bs-form-card {
    overflow: visible;
}

.bs-steps {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 120;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.bs-steps::-webkit-scrollbar {
    height: 4px;
}

.bs-steps::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
}

.bs-step {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: center;
    font: inherit;
    line-height: 1.35;
    white-space: nowrap;
}

.bs-step i {
    flex-shrink: 0;
}

.bs-step span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-step:hover {
    color: #92400e;
    background: rgba(255, 255, 255, 0.72);
}

.bs-step:focus-visible {
    outline: 2px solid rgba(217, 119, 6, 0.55);
    outline-offset: 2px;
}

.bs-step.is-active {
    background: #fff;
    color: #b45309;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.bs-form-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    scroll-margin-top: var(--bs-steps-offset, 5.5rem);
}

.bs-form-section:last-of-type {
    border-bottom: none;
}

.bs-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bs-section-title i {
    color: var(--bs-accent);
}

.ja-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    font: inherit;
    resize: vertical;
    min-height: 4.5rem;
    background: rgba(255, 255, 255, 0.9);
}

.bs-option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.bs-option-cards--2 {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.bs-option-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.bs-option-card:has(input:checked) {
    border-color: var(--bs-accent);
    background: var(--bs-accent-soft);
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.2);
}

.bs-option-card input {
    accent-color: var(--bs-accent);
}

.bs-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 0.88rem;
    line-height: 1.6;
    cursor: pointer;
}

.bs-terms-label input {
    margin-top: 0.2rem;
    accent-color: var(--bs-accent);
    flex-shrink: 0;
}

.bs-submit-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
}

.bs-ref-code {
    color: #b45309 !important;
}

.bs-success-next {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
}

/* Arabic text fields: explicit RTL (dir="auto" alone often left-aligns placeholders) */
html[dir="rtl"] body.bs-portal .bs-form-card .ja-field input:not([dir="ltr"]),
html[dir="rtl"] body.bs-portal .bs-form-card .ja-field textarea:not([dir="ltr"]),
html[dir="rtl"] body.bs-portal .bs-form-card .ja-input:not([dir="ltr"]),
html[dir="rtl"] body.bs-portal .bs-form-card .ja-textarea:not([dir="ltr"]),
html[dir="rtl"] body.bs-portal .bs-form-card .bs-combobox-input:not([dir="ltr"]) {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body.bs-portal .bs-form-card .ja-field input:not([dir="ltr"])::placeholder,
html[dir="rtl"] body.bs-portal .bs-form-card .ja-field textarea:not([dir="ltr"])::placeholder,
html[dir="rtl"] body.bs-portal .bs-form-card .ja-input:not([dir="ltr"])::placeholder,
html[dir="rtl"] body.bs-portal .bs-form-card .ja-textarea:not([dir="ltr"])::placeholder,
html[dir="rtl"] body.bs-portal .bs-form-card .bs-combobox-input:not([dir="ltr"])::placeholder {
    text-align: right;
}

html[dir="ltr"] body.bs-portal .bs-form-card .ja-field input:not([dir="ltr"]),
html[dir="ltr"] body.bs-portal .bs-form-card .ja-field textarea:not([dir="ltr"]),
html[dir="ltr"] body.bs-portal .bs-form-card .ja-input:not([dir="ltr"]),
html[dir="ltr"] body.bs-portal .bs-form-card .ja-textarea:not([dir="ltr"]),
html[dir="ltr"] body.bs-portal .bs-form-card .bs-combobox-input:not([dir="ltr"]) {
    direction: ltr;
    text-align: left;
}

@media (max-width: 900px) {
    .bs-steps {
        gap: 0.35rem;
        padding: 0.45rem 0.5rem;
        /* Single compact sticky row — never stack labels on small screens */
    }

    .bs-step {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 0.4rem 0.7rem;
        font-size: 0.74rem;
        justify-content: flex-start;
        text-align: inherit;
    }

    .bs-step span {
        overflow: visible;
        text-overflow: unset;
    }
}

body.bs-cv-view .ja-cv-inner-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: auto;
    background: #fff;
}
body.bs-cv-view .ja-cv-inner-table th,
body.bs-cv-view .ja-cv-inner-table td {
    width: auto;
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: inherit;
}
body.bs-cv-view .ja-cv-inner-table thead th {
    background: #f8fafc;
    font-weight: 800;
}
@media print {
    body.bs-cv-view .ja-cv-toolbar,
    body.bs-cv-view .ja-topbar,
    body.bs-cv-view .ambient {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .bs-steps {
        gap: 0.3rem;
        padding: 0.4rem 0.4rem;
        border-radius: 10px;
    }

    .bs-step {
        padding: 0.38rem 0.55rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }
}
