/* Agent booking UI: shared rhythm, controls, and state presentation. */
body.mosbus-app .st-screen {
    --ui-line: var(--ath-border);
    --ui-muted: var(--ath-muted);
    --ui-radius: var(--ath-radius-md);
    --ui-control-radius: var(--ath-radius-default);
}

body.mosbus-app .st-screen .mb-stepper,
body.mosbus-app .st-screen .rb-step-progress {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 64px !important;
    margin: 0 0 16px !important;
    padding: 10px 16px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.mosbus-app .st-screen .mb-stepper__item,
body.mosbus-app .st-screen .rb-step-progress-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 4px 10px !important;
    color: var(--ui-muted) !important;
    white-space: normal !important;
}

body.mosbus-app .st-screen .mb-stepper__badge,
body.mosbus-app .st-screen .rb-step-progress-badge {
    display: inline-grid !important;
    flex: 0 0 26px !important;
    place-items: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

body.mosbus-app .st-screen .mb-stepper__item strong,
body.mosbus-app .st-screen .rb-step-progress-item strong {
    max-width: none !important;
    font-size: 13px !important;
    line-height: 18px !important;
    font-weight: 600 !important;
}

body.mosbus-app .st-screen .mb-stepper__item.is-active strong,
body.mosbus-app .st-screen .rb-step-progress-item.is-active strong {
    font-weight: 750 !important;
}

body.mosbus-app .st-screen .mb-stepper__item:not(:last-child)::after,
body.mosbus-app .st-screen .rb-step-progress-item:not(:last-child)::after {
    display: block !important;
    content: "" !important;
    top: 50% !important;
    right: -8px !important;
    left: auto !important;
    width: 16px !important;
    height: 1px !important;
    background: var(--ui-line) !important;
    transform: translateY(-50%);
}

body.mosbus-app .st-screen .field-error {
    display: block;
    min-height: 19px;
    margin: 5px 0 0;
    color: #b4232e;
    font-size: 12px;
    line-height: 19px;
    font-weight: 600;
}

body.mosbus-app .st-screen .field-error[hidden] {
    display: block !important;
    visibility: hidden;
}

body.mosbus-app .st-screen .field .is-invalid {
    border-color: #d92d38 !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 56, .09) !important;
}

body.mosbus-app .st-screen .form-required-note {
    display: flex;
    align-items: flex-start !important;
    gap: 9px;
    line-height: 1.45;
}

body.mosbus-app .st-screen .form-required-note > i {
    display: inline-grid;
    flex: 0 0 17px;
    place-items: center;
    width: 17px;
    height: 21px;
    line-height: 1;
}

body.mosbus-app .st-screen .btn,
body.mosbus-app .st-screen button,
body.mosbus-app .st-screen .st-review-edit {
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.mosbus-app .st-screen .btn > i,
body.mosbus-app .st-screen button > i,
body.mosbus-app .st-screen .st-review-edit > i,
body.mosbus-app .st-screen .rb-filter-block-head > i {
    display: inline-grid;
    flex: 0 0 16px;
    place-items: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

body.mosbus-app .st-screen .page-title {
    font-size: clamp(24px, 2.3vw, 30px) !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
}

body.mosbus-app .st-screen .section-title {
    font-size: 17px !important;
    line-height: 1.35 !important;
}

body.mosbus-app .st-screen .field label,
body.mosbus-app .st-screen .rb-filter-block-head {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

body.mosbus-app .st-screen .input,
body.mosbus-app .st-screen select {
    border-radius: var(--ui-control-radius) !important;
}

body.mosbus-app .st-screen .rb-seat-coach,
body.mosbus-app .st-screen .rb-summary-panel,
body.mosbus-app .st-screen .figma-passenger-form,
body.mosbus-app .st-screen .figma-passenger-sidebar,
body.mosbus-app .st-screen .figma-review-summary,
body.mosbus-app .st-screen .figma-review-passengers,
body.mosbus-app .st-screen .booking-policy-card,
body.mosbus-app .st-screen .st-review-wallet {
    border-color: var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
}

/* Seat selection: aligned point fields and a readable, non-shifting error slot. */
body.mosbus-app .st-seat-screen .st-seat-overview {
    display: block;
    min-height: 0;
    margin-bottom: 16px;
    padding: 12px;
}

body.mosbus-app .st-seat-screen .rb-seat-journey-grid > div {
    padding: 8px 12px !important;
}

body.mosbus-app .st-seat-screen .rb-boarding-row {
    align-items: start;
    gap: 12px 18px;
    margin-top: 22px;
    padding: 18px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: #fff !important;
}

body.mosbus-app .st-seat-screen .rb-boarding-row .form-required-note {
    margin: 0 0 4px !important;
    color: #526784 !important;
    font-size: 13px !important;
}

body.mosbus-app .st-seat-screen .rb-boarding-row .field {
    display: grid;
    grid-template-rows: auto 48px minmax(19px, auto);
    align-content: start;
    min-width: 0;
    gap: 0;
}

body.mosbus-app .st-seat-screen .rb-boarding-row .field label {
    margin-bottom: 8px !important;
    font-size: 12px !important;
}

body.mosbus-app .st-seat-screen .rb-boarding-row .rb-seat-select {
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 38px 0 14px !important;
    font-size: 14px !important;
    line-height: 1.4;
    text-overflow: ellipsis;
}

body.mosbus-app .st-seat-screen .rb-summary-total,
body.mosbus-app .st-passenger-screen .rb-summary-total,
body.mosbus-app .st-review-screen .figma-review-total,
body.mosbus-app .st-review-screen .booking-wallet-note {
    min-height: 58px;
    padding: 14px 18px !important;
    border-radius: var(--ui-control-radius) !important;
}

body.mosbus-app .st-seat-screen .rb-summary-total > span,
body.mosbus-app .st-passenger-screen .rb-summary-total > span {
    font-size: 13px !important;
    line-height: 1.35;
}

body.mosbus-app .st-seat-screen .rb-summary-total > strong,
body.mosbus-app .st-passenger-screen .rb-summary-total > strong {
    font-size: 19px !important;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

/* Passenger and review: labels, values, and money use distinct sizes. */
body.mosbus-app .st-passenger-screen .figma-passenger-copy p,
body.mosbus-app .st-review-screen .figma-review-copy p,
body.mosbus-app .st-seat-screen .rb-seat-header p {
    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.mosbus-app .st-passenger-screen .field label {
    margin-bottom: 7px !important;
}

body.mosbus-app .st-passenger-screen .input {
    min-height: 44px !important;
    font-size: 14px !important;
}

body.mosbus-app .st-passenger-screen .figma-trip-summary-row > span,
body.mosbus-app .st-review-screen .figma-detail-grid span,
body.mosbus-app .st-review-screen .figma-review-points span,
body.mosbus-app .st-review-screen .figma-manifest-field span {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

body.mosbus-app .st-passenger-screen .figma-trip-summary-row > strong,
body.mosbus-app .st-review-screen .figma-detail-grid strong,
body.mosbus-app .st-review-screen .figma-review-points strong,
body.mosbus-app .st-review-screen .figma-manifest-field strong {
    font-size: 14px !important;
    line-height: 1.45 !important;
}

body.mosbus-app .st-review-screen .figma-review-points .summary-item {
    grid-template-columns: 100px minmax(0, 1fr) !important;
    gap: 12px;
    padding: 12px 0 !important;
}

body.mosbus-app .st-review-screen .figma-review-total,
body.mosbus-app .st-review-screen .booking-wallet-note {
    gap: 16px;
}

/* Results filters: comfortable check targets, no needless inner scrollbar. */
body.mosbus-app .st-results-screen .rb-filter-panel,
body.mosbus-app .st-results-screen .figma-results-toolbar,
body.mosbus-app .st-results-screen .rb-result-card {
    border-radius: var(--ui-radius) !important;
}

body.mosbus-app .st-results-screen .rb-filter-panel {
    padding: 18px !important;
}

body.mosbus-app .st-results-screen .rb-filter-header .section-title {
    font-size: 17px !important;
}

body.mosbus-app .st-results-screen .rb-filter-block {
    padding: 16px 0;
}

body.mosbus-app .st-results-screen .rb-filter-check-group {
    gap: 5px;
    margin-top: 10px;
}

body.mosbus-app .st-results-screen .rb-filter-checkbox,
body.mosbus-app .st-results-screen .rb-filter-block:first-child .rb-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 5px 3px;
    font-size: 13px !important;
    line-height: 1.35;
}

body.mosbus-app .st-results-screen .rb-filter-checkbox input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
}

body.mosbus-app .st-results-screen .rb-filter-checkbox > span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

body.mosbus-app .st-results-screen #operatorFilterList {
    max-height: none;
    overflow: visible;
}

/* My Bookings: useful empty state and compact, top-aligned support rail. */
body.mosbus-app .my-bookings-page .rb-profile-shell.profile-layout {
    align-items: start;
    gap: 20px !important;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar .panel {
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 18px !important;
    border-radius: 12px !important;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar .summary-list {
    gap: 8px;
    margin-top: 12px;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar .summary-item {
    gap: 10px !important;
    min-height: 54px;
    padding: 11px 12px !important;
    border-radius: 9px !important;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar .summary-item > span {
    flex: 0 0 37%;
}

body.mosbus-app .my-bookings-page .rb-profile-sidebar .summary-item > strong {
    flex: 1;
    text-align: right;
}

body.mosbus-app .my-bookings-page .table-scroll:has(.empty-state) {
    overflow: hidden;
}

body.mosbus-app .my-bookings-page .rb-bookings-table:has(.empty-state) {
    min-width: 0;
}

body.mosbus-app .my-bookings-page .rb-bookings-table .empty-state td {
    padding: 0 !important;
}

body.mosbus-app .my-bookings-page .rb-bookings-empty {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 38px 18px;
    text-align: center;
}

body.mosbus-app .my-bookings-page .rb-bookings-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #fff1f2;
    color: #c51f30;
    font-size: 19px;
}

body.mosbus-app .my-bookings-page .rb-bookings-empty h3 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    line-height: 1.3;
}

body.mosbus-app .my-bookings-page .rb-bookings-empty p {
    max-width: 370px;
    margin: 0;
    color: #61738f;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

body.mosbus-app .my-bookings-page .rb-bookings-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin-top: 8px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13px;
}

@media (max-width: 700px) {
    body.mosbus-app .my-bookings-page .rb-profile-sidebar {
        padding-inline: 10px;
    }

    body.mosbus-app .st-screen .mb-stepper,
    body.mosbus-app .st-screen .rb-step-progress {
        min-height: 62px !important;
        padding: 8px 6px !important;
    }

    body.mosbus-app .st-screen .mb-stepper__item,
    body.mosbus-app .st-screen .rb-step-progress-item {
        flex-direction: column !important;
        gap: 4px !important;
        min-height: 46px !important;
        padding: 2px 3px !important;
        text-align: center;
    }

    body.mosbus-app .st-screen .mb-stepper__item strong,
    body.mosbus-app .st-screen .rb-step-progress-item strong {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    body.mosbus-app .st-screen .mb-stepper__item:not(:last-child)::after,
    body.mosbus-app .st-screen .rb-step-progress-item:not(:last-child)::after {
        display: none !important;
    }

    body.mosbus-app .st-seat-screen .rb-boarding-row {
        grid-template-columns: 1fr !important;
        gap: 10px;
        padding: 14px !important;
    }

    body.mosbus-app .st-seat-screen .rb-boarding-row .form-required-note {
        grid-column: 1;
    }

    body.mosbus-app .st-results-screen .rb-filter-block:first-child .rb-filter-check-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    body.mosbus-app .st-screen .mb-stepper__badge,
    body.mosbus-app .st-screen .rb-step-progress-badge {
        flex-basis: 24px !important;
        width: 24px !important;
        height: 24px !important;
    }

    body.mosbus-app .my-bookings-page .rb-profile-sidebar .summary-item {
        align-items: flex-start !important;
    }
}

/* Final booking-flow alignment with the shared design tokens. */
body.mosbus-app .st-screen {
    font-family: Inter, system-ui, sans-serif;
}

body.mosbus-app .st-screen .page-title,
body.mosbus-app .st-screen .section-title,
body.mosbus-app .st-screen .rb-result-head h2,
body.mosbus-app .st-screen .rb-seat-deck__head h3,
body.mosbus-app .st-screen .figma-review-route-copy strong,
body.mosbus-app .st-screen .rb-result-price,
body.mosbus-app .st-screen .rb-route-point strong,
body.mosbus-app .st-screen .rb-summary-total > strong,
body.mosbus-app .st-screen .figma-review-total > strong,
body.mosbus-app .st-screen .booking-wallet-note > strong {
    font-family: Geist, Inter, sans-serif !important;
    font-variant-numeric: tabular-nums;
}

body.mosbus-app .st-search-screen .mb-search-intro .page-title {
    font: 700 32px/38px Geist, Inter, sans-serif !important;
    letter-spacing: -.02em !important;
}

body.mosbus-app .st-seat-screen .page-title,
body.mosbus-app .st-passenger-screen .page-title,
body.mosbus-app .st-review-screen .page-title {
    font-size: 24px !important;
    line-height: 32px !important;
    letter-spacing: -.015em !important;
}

body.mosbus-app .st-screen .section-title {
    font-size: 16px !important;
    line-height: 24px !important;
    font-weight: 600 !important;
}

body.mosbus-app .st-screen .btn.primary,
body.mosbus-app .st-search-screen .mb-search-submit {
    border-radius: var(--ath-radius-default) !important;
    background: var(--ath-primary-container) !important;
    border-color: var(--ath-primary-container) !important;
    box-shadow: var(--ath-shadow-cta) !important;
}

body.mosbus-app .st-screen .btn.primary:hover,
body.mosbus-app .st-search-screen .mb-search-submit:hover {
    background: #c92532 !important;
    border-color: #c92532 !important;
}

body.mosbus-app .st-screen .btn.secondary,
body.mosbus-app .st-search-screen .mb-search-control,
body.mosbus-app .st-search-screen .mb-search-date-chip {
    border-radius: var(--ath-radius-default) !important;
}

body.mosbus-app .st-screen .rb-seat-coach,
body.mosbus-app .st-screen .rb-summary-panel,
body.mosbus-app .st-screen .rb-boarding-row,
body.mosbus-app .st-screen .figma-passenger-form,
body.mosbus-app .st-screen .figma-passenger-sidebar,
body.mosbus-app .st-screen .passenger-card,
body.mosbus-app .st-screen .figma-review-summary,
body.mosbus-app .st-screen .figma-review-passengers,
body.mosbus-app .st-screen .booking-policy-card,
body.mosbus-app .st-screen .st-review-wallet,
body.mosbus-app .st-results-screen .rb-filter-panel,
body.mosbus-app .st-results-screen .figma-results-toolbar,
body.mosbus-app .st-results-screen .rb-result-card {
    border-color: var(--ath-border) !important;
}

@media (min-width: 701px) {
    body.mosbus-app .st-search-screen .mb-search-action {
        align-self: start !important;
        margin-top: 21px !important;
        min-height: 46px !important;
    }

    body.mosbus-app .st-search-screen .mb-search-swap {
        align-self: start !important;
        margin-top: 27px !important;
        margin-bottom: 0 !important;
    }
}

body.mosbus-app .st-search-screen .mb-search-submit {
    height: 46px !important;
    min-height: 46px !important;
}

body.mosbus-app .st-search-screen .mb-search-submit:disabled {
    cursor: wait;
    opacity: .72;
    box-shadow: none !important;
}

@media (max-width: 700px) {
    body.mosbus-app .st-search-screen .mb-search-intro .page-title {
        font-size: 28px !important;
        line-height: 34px !important;
    }
}

@media (min-width: 1024px) {
    body.mosbus-app .st-results-screen .rb-result-shell {
        grid-template-columns: minmax(0, 3fr) minmax(190px, 1fr) !important;
    }
}

body.mosbus-app .st-results-screen .rb-result-main,
body.mosbus-app .st-results-screen .rb-result-price-panel {
    padding: 16px !important;
}

body.mosbus-app .st-results-screen .rb-result-head h2 {
    font-size: 16px !important;
    line-height: 24px !important;
}

body.mosbus-app .st-results-screen .rb-result-price-panel {
    gap: 14px !important;
}

body.mosbus-app .st-results-screen .rb-result-price,
body.mosbus-app .st-results-screen .rb-result-card .rb-result-price {
    font-size: 22px !important;
    line-height: 26px !important;
}

body.mosbus-app .st-results-screen .rb-result-tax-note {
    max-width: 200px;
    font: 400 11px/16px Inter, sans-serif !important;
}

body.mosbus-app .st-results-screen .rb-service-fact__label,
body.mosbus-app .st-results-screen .mb-policy-label,
body.mosbus-app .st-results-screen .mb-policy-copy strong {
    font-size: 11px !important;
    line-height: 16px !important;
}

body.mosbus-app .st-results-screen .rb-policy-strip {
    min-height: 30px;
}

body.mosbus-app .st-results-screen .mb-policy-copy {
    overflow: visible;
}

body.mosbus-app .st-results-screen .mb-policy-copy strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

body.mosbus-app .st-results-screen .mb-policy-info {
    display: inline-grid;
    flex: 0 0 18px;
    place-items: center;
    width: 18px;
    height: 18px;
}

body.mosbus-app .st-seat-screen .rb-seat-decks.is-split {
    align-items: start;
}

body.mosbus-app .st-seat-screen .rb-seat-deck {
    align-self: start;
}

body.mosbus-app .st-seat-screen .rb-seat-deck__head span,
body.mosbus-app .st-seat-screen .rb-seat-cell__fare {
    color: #475569;
    font-size: 11px;
    line-height: 16px;
}

body.mosbus-app .st-seat-screen .rb-provider-grid .seat,
body.mosbus-app .st-seat-screen .rb-provider-grid .seat.sleeper-seat {
    font-size: 12px !important;
}

body.mosbus-app .st-seat-screen .rb-provider-grid .seat.selected:hover,
body.mosbus-app .st-seat-screen .rb-provider-grid .seat.is-selected:hover,
body.mosbus-app .st-seat-screen .rb-provider-grid .seat.selected:focus-visible,
body.mosbus-app .st-seat-screen .rb-provider-grid .seat.is-selected:focus-visible {
    border-color: var(--ath-primary-container) !important;
    background: var(--ath-primary-container) !important;
    color: var(--ath-on-primary) !important;
}

body.mosbus-app .st-seat-screen .rb-seat-cell__fare--booked {
    color: #64748b;
}

body.mosbus-app .st-passenger-screen .passenger-card {
    gap: 10px !important;
}

body.mosbus-app .st-passenger-screen .figma-passenger-form .form-required-note {
    border-color: var(--ath-secondary-fixed) !important;
    background: var(--ath-surface-container-low) !important;
    color: var(--ath-on-surface) !important;
}

body.mosbus-app .st-passenger-screen .form-grid.two {
    gap: 8px 14px !important;
}

body.mosbus-app .st-passenger-screen .field {
    gap: 3px;
}

body.mosbus-app .st-passenger-screen .field label {
    margin-bottom: 4px !important;
}

body.mosbus-app .st-passenger-screen .field-error {
    min-height: 16px;
    margin-top: 2px;
    line-height: 16px;
}

body.mosbus-app .st-review-screen .st-review-main {
    align-content: start;
    gap: 12px;
}

body.mosbus-app .st-review-screen .booking-policy-card {
    display: block !important;
    align-self: start;
    min-height: 0 !important;
    padding: 16px 18px !important;
}

body.mosbus-app .st-review-screen .booking-policy-card .section-title {
    margin: 0 0 6px !important;
}

body.mosbus-app .st-review-screen .booking-policy-card p,
body.mosbus-app .st-review-screen .booking-policy-card details {
    font-size: 13px !important;
    line-height: 18px !important;
}

body.mosbus-app .st-review-screen .booking-policy-card details {
    margin-top: 8px;
}
body.mosbus-app .st-passenger-screen .rb-passenger-seat-rule {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 20px;
    padding: 5px 10px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font: 600 12px/17px Inter, sans-serif;
}
body.mosbus-app .st-passenger-screen .rb-passenger-seat-rule.is-women {
    border-color: #fbcfe8;
    background: #fdf2f8;
    color: #be185d;
}
