/**
 * Saar Travel v3.2.1 — Professional public booking/payment UI
 * Final visual authority for direct-booking and payment checkout components.
 */

:root {
    --stm-pay-primary: var(--stm-primary, #263967);
    --stm-pay-primary-dark: var(--stm-primary-dark, #182851);
    --stm-pay-accent: var(--stm-accent, #92972f);
    --stm-pay-text: var(--stm-text, #2d2d2d);
    --stm-pay-muted: #69707d;
    --stm-pay-border: rgba(38, 57, 103, .13);
    --stm-pay-soft: #f8f9fb;
    --stm-pay-radius: 18px;
    --stm-pay-inner-radius: 13px;
    --stm-pay-shadow: 0 18px 50px rgba(24, 40, 81, .08);
}

/* =========================================================
   DIRECT BOOKING CONTAINER
   ========================================================= */
.stm-direct-booking-wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    color: var(--stm-pay-text);
}

.stm-booking-header {
    max-width: 680px;
    margin: 0 auto 24px;
    text-align: center;
}

.stm-booking-eyebrow,
.stm-payment-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--stm-pay-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.stm-booking-eyebrow::before,
.stm-payment-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
}

.stm-booking-header h2 {
    margin: 0 0 9px !important;
    color: var(--stm-pay-primary) !important;
    font-family: var(--stm-heading-font, Georgia, serif) !important;
    font-size: clamp(31px, 4vw, 42px) !important;
    line-height: 1.08 !important;
}

.stm-booking-header p {
    margin: 0 auto !important;
    color: var(--stm-pay-muted) !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.stm-direct-booking-form {
    width: 100%;
    padding: clamp(22px, 4vw, 34px) !important;
    border: 1px solid var(--stm-pay-border) !important;
    border-radius: var(--stm-pay-radius) !important;
    background: #fff !important;
    box-shadow: var(--stm-pay-shadow) !important;
}

.stm-direct-booking-form .stm-form-grid {
    gap: 16px !important;
}

.stm-direct-booking-form .stm-form-field label,
.stm-bank-transfer-form .stm-form-field label {
    display: block;
    margin-bottom: 7px;
    color: #333946;
    font-size: 12px;
    font-weight: 700;
}

.stm-direct-booking-form .stm-form-field input,
.stm-direct-booking-form .stm-form-field select,
.stm-direct-booking-form .stm-form-field textarea,
.stm-bank-transfer-form .stm-form-field input,
.stm-bank-transfer-form .stm-form-field select,
.stm-bank-transfer-form .stm-form-field textarea {
    min-height: 48px;
    border: 1px solid #dfe3ea !important;
    border-radius: 11px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.stm-direct-booking-form .stm-form-field textarea,
.stm-bank-transfer-form .stm-form-field textarea {
    min-height: 100px;
}

.stm-direct-booking-form .stm-form-field input:focus,
.stm-direct-booking-form .stm-form-field select:focus,
.stm-direct-booking-form .stm-form-field textarea:focus,
.stm-bank-transfer-form .stm-form-field input:focus,
.stm-bank-transfer-form .stm-form-field select:focus,
.stm-bank-transfer-form .stm-form-field textarea:focus {
    border-color: var(--stm-pay-primary) !important;
    box-shadow: 0 0 0 3px rgba(38, 57, 103, .09) !important;
    outline: 0 !important;
}

/* Add-ons */
.stm-booking-addons-fieldset {
    margin: 24px 0 0;
    padding: 20px;
    border: 1px solid var(--stm-pay-border);
    border-radius: var(--stm-pay-inner-radius);
    background: var(--stm-pay-soft);
}

.stm-booking-addons-fieldset legend {
    padding: 0 8px;
    color: var(--stm-pay-primary);
    font-size: 12px;
    font-weight: 800;
}

.stm-booking-addon-row {
    border-color: #e0e4ea !important;
    border-radius: 11px !important;
    background: #fff !important;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.stm-booking-addon-row:hover {
    border-color: rgba(38, 57, 103, .28) !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(24, 40, 81, .05);
}

/* Cost hierarchy */
.stm-booking-cost-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 20px;
}

.stm-booking-estimate,
.stm-booking-pay-now-estimate {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center !important;
    min-height: 112px;
    margin: 0 !important;
    padding: 18px 20px !important;
    border-radius: 14px !important;
}

.stm-booking-estimate {
    border: 1px solid var(--stm-pay-border) !important;
    background: #f8f9fb !important;
}

.stm-booking-pay-now-estimate {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(146, 151, 47, .34) !important;
    background: linear-gradient(135deg, rgba(146, 151, 47, .11), rgba(146, 151, 47, .045)) !important;
}

.stm-booking-pay-now-estimate::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--stm-pay-accent);
}

.stm-booking-estimate > span,
.stm-booking-pay-now-estimate > span {
    margin: 0 0 5px;
    color: var(--stm-pay-muted) !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.stm-booking-estimate > strong,
.stm-booking-pay-now-estimate > strong {
    color: var(--stm-pay-primary) !important;
    font-size: clamp(25px, 3vw, 31px) !important;
    line-height: 1.1;
}

.stm-booking-estimate > small,
.stm-booking-pay-now-estimate > small {
    display: block;
    margin-top: 7px;
    color: var(--stm-pay-muted);
    font-size: 10.5px;
    line-height: 1.45;
}

/* Booking payment method selector */
.stm-booking-payment-methods {
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
}

.stm-booking-payment-methods legend {
    margin: 0 0 11px !important;
    color: var(--stm-pay-primary) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.stm-booking-payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stm-booking-payment-option {
    position: relative;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    gap: 12px !important;
    align-items: center !important;
    min-height: 86px;
    margin: 0 !important;
    padding: 16px !important;
    border: 1px solid #dfe3ea !important;
    border-radius: 13px !important;
    background: #fff !important;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.stm-booking-payment-option:hover {
    border-color: rgba(38, 57, 103, .34) !important;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(24, 40, 81, .06);
}

.stm-booking-payment-option:has(input:checked) {
    border-color: var(--stm-pay-primary) !important;
    background: rgba(38, 57, 103, .025) !important;
    box-shadow: 0 0 0 3px rgba(38, 57, 103, .07);
}

.stm-booking-payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stm-payment-option-icon,
.stm-payment-method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(38, 57, 103, .08);
    color: var(--stm-pay-primary);
    font-size: 18px;
    font-weight: 800;
}

.stm-payment-option-copy {
    min-width: 0;
}

.stm-payment-option-copy strong {
    display: block;
    margin-bottom: 3px;
    color: var(--stm-pay-primary-dark);
    font-size: 14px;
    line-height: 1.3;
}

.stm-payment-option-copy small {
    display: block;
    color: var(--stm-pay-muted);
    font-size: 10.5px;
    line-height: 1.45;
}

.stm-payment-option-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid #d9dde5;
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
    font-weight: 900;
    transition: .2s ease;
}

.stm-booking-payment-option:has(input:checked) .stm-payment-option-check {
    border-color: var(--stm-pay-primary);
    background: var(--stm-pay-primary);
    color: #fff;
}

.stm-booking-security-note,
.stm-payment-security-strip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f7f8fa;
    color: var(--stm-pay-muted);
}

.stm-booking-security-note > span,
.stm-payment-security-strip > span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    margin-top: 1px;
    border-radius: 50%;
    background: #e8f5eb;
    color: #2f7d4a;
    font-size: 10px;
    font-weight: 900;
}

.stm-booking-security-note p,
.stm-payment-security-strip p {
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.55 !important;
}

.stm-booking-submit,
.stm-payment-primary-action,
.stm-bank-proof-submit {
    min-height: 50px !important;
    border-radius: 11px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
}

.stm-booking-submit {
    width: 100%;
    margin-top: 2px;
}

/* =========================================================
   PAYMENT CHECKOUT AFTER BOOKING / CUSTOMER PORTAL
   ========================================================= */
.stm-payment-checkout {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--stm-pay-border);
    border-radius: var(--stm-pay-radius);
    background: #fff;
    box-shadow: var(--stm-pay-shadow);
    box-sizing: border-box;
}

.stm-payment-checkout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf0f4;
}

.stm-payment-checkout-header h3 {
    margin: 0 0 7px !important;
    color: var(--stm-pay-primary) !important;
    font-family: var(--stm-heading-font, Georgia, serif) !important;
    font-size: clamp(29px, 4vw, 38px) !important;
    line-height: 1.1 !important;
}

.stm-payment-checkout-header p {
    max-width: 600px;
    margin: 0 !important;
    color: var(--stm-pay-muted) !important;
    font-size: 12px !important;
    line-height: 1.65 !important;
}

.stm-payment-booking-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(38, 57, 103, .12);
    border-radius: 999px;
    background: #f7f8fa;
    color: var(--stm-pay-primary);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
}

.stm-payment-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
}

.stm-payment-summary > div {
    min-width: 0;
    padding: 15px 16px !important;
    border: 1px solid var(--stm-pay-border) !important;
    border-radius: 12px !important;
    background: #f8f9fb !important;
}

.stm-payment-summary > .stm-payment-summary-paid {
    background: #f6faf7 !important;
}

.stm-payment-summary > .stm-payment-summary-balance {
    background: #fbf8f4 !important;
}

.stm-payment-summary span {
    display: block;
    margin: 0 0 4px !important;
    color: var(--stm-pay-muted) !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase;
}

.stm-payment-summary strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--stm-pay-primary) !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}

.stm-payment-due {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 22px !important;
    margin: 0 0 18px !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(146, 151, 47, .30) !important;
    border-left: 1px solid rgba(146, 151, 47, .30) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(146, 151, 47, .115), rgba(146, 151, 47, .045)) !important;
}

.stm-payment-due span {
    margin: 0 0 4px !important;
    color: #656b5b !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase;
}

.stm-payment-due small {
    display: block;
    color: var(--stm-pay-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.stm-payment-due strong {
    flex: 0 0 auto;
    color: var(--stm-pay-primary) !important;
    font-size: clamp(28px, 4vw, 36px) !important;
    line-height: 1 !important;
}

.stm-payment-methods {
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) !important;
    gap: 14px !important;
}

.stm-payment-method-card {
    min-width: 0;
    padding: 22px !important;
    border: 1px solid var(--stm-pay-border) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.stm-payment-razorpay-card {
    position: relative;
    border-color: rgba(38, 57, 103, .22) !important;
    background: linear-gradient(180deg, rgba(38, 57, 103, .025), #fff 45%) !important;
}

.stm-payment-method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stm-payment-method-head h3 {
    margin: 2px 0 0 !important;
    color: var(--stm-pay-primary) !important;
    font-family: var(--stm-heading-font, Georgia, serif) !important;
    font-size: 25px !important;
}

.stm-payment-method-badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(146, 151, 47, .12);
    color: #70751f;
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.stm-payment-method-card > p,
.stm-bank-method-body > p {
    margin: 0 0 14px !important;
    color: var(--stm-pay-muted) !important;
    font-size: 11.5px !important;
    line-height: 1.65 !important;
}

.stm-payment-benefits {
    display: grid;
    gap: 7px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.stm-payment-benefits li {
    position: relative;
    margin: 0;
    padding-left: 20px;
    color: #444b57;
    font-size: 10.5px;
    line-height: 1.45;
}

.stm-payment-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #2f7d4a;
    font-weight: 900;
}

.stm-payment-primary-action {
    width: 100%;
}

.stm-payment-message {
    min-height: 0 !important;
    margin-top: 10px !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.45;
}

.stm-payment-message:empty {
    display: none;
}

/* Bank transfer is intentionally secondary and expandable. */
details.stm-payment-bank-card {
    padding: 0 !important;
    overflow: hidden;
}

.stm-bank-summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: center;
    min-height: 84px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.stm-bank-summary::-webkit-details-marker {
    display: none;
}

.stm-bank-summary-copy strong,
.stm-bank-summary-copy small {
    display: block;
}

.stm-bank-summary-copy strong {
    margin-bottom: 4px;
    color: var(--stm-pay-primary-dark);
    font-family: var(--stm-heading-font, Georgia, serif);
    font-size: 22px;
    line-height: 1.2;
}

.stm-bank-summary-copy small {
    color: var(--stm-pay-muted);
    font-size: 10px;
    line-height: 1.45;
}

.stm-bank-summary-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #dfe3ea;
    border-radius: 50%;
    color: var(--stm-pay-primary);
    font-size: 17px;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

details.stm-payment-bank-card[open] .stm-bank-summary-toggle {
    transform: rotate(45deg);
    border-color: var(--stm-pay-primary);
    background: var(--stm-pay-primary);
    color: #fff;
}

.stm-bank-method-body {
    padding: 0 20px 20px;
    border-top: 1px solid #edf0f4;
}

.stm-bank-details {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 18px 0 12px !important;
}

.stm-bank-details > div {
    padding: 11px 12px !important;
    border: 1px solid #e3e6eb !important;
    border-radius: 10px !important;
    background: #fafbfc !important;
}

.stm-bank-details span {
    margin-bottom: 3px !important;
    color: var(--stm-pay-muted) !important;
    font-size: 8.5px !important;
    font-weight: 800 !important;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.stm-bank-details strong {
    color: #333946 !important;
    font-size: 10.5px !important;
    line-height: 1.45;
}

.stm-bank-instructions {
    margin: 0 0 14px !important;
    padding: 11px 12px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #f7f8fa !important;
    color: var(--stm-pay-muted) !important;
    font-size: 10px !important;
    line-height: 1.55 !important;
}

.stm-bank-transfer-form {
    margin-top: 15px !important;
    padding-top: 16px !important;
    border-top: 1px solid #edf0f4 !important;
}

.stm-bank-transfer-form .stm-form-grid {
    gap: 12px !important;
}

.stm-bank-transfer-form input[type="file"] {
    padding: 9px 10px !important;
    line-height: 1.2;
}

.stm-booking-disclaimer {
    margin: 13px 0 !important;
    color: var(--stm-pay-muted) !important;
    font-size: 10px !important;
    line-height: 1.55 !important;
}

.stm-bank-proof-submit {
    width: 100%;
}

/* Better semantic messages inside payment flow */
.stm-direct-booking-wrap > .stm-form-success,
.stm-direct-booking-wrap > .stm-form-error,
.stm-payment-checkout > .stm-form-success,
.stm-payment-checkout > .stm-form-error {
    margin: 0 0 18px !important;
    padding: 13px 15px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
}

.stm-payment-security-strip {
    margin: 16px 0 0;
}

/* Customer portal payment section */
.stm-customer-payment-section .stm-payment-checkout {
    margin-top: 18px !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 800px) {
    .stm-booking-cost-summary,
    .stm-booking-payment-options,
    .stm-payment-methods {
        grid-template-columns: 1fr !important;
    }

    .stm-payment-checkout-header {
        flex-direction: column;
        gap: 12px;
    }

    .stm-payment-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .stm-direct-booking-form,
    .stm-payment-checkout {
        padding: 18px !important;
        border-radius: 14px !important;
    }

    .stm-booking-header {
        margin-bottom: 18px;
    }

    .stm-booking-header h2,
    .stm-payment-checkout-header h3 {
        font-size: 30px !important;
    }

    .stm-payment-summary {
        grid-template-columns: 1fr !important;
    }

    .stm-payment-summary > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .stm-payment-summary span {
        margin: 0 !important;
    }

    .stm-payment-summary strong {
        text-align: right;
    }

    .stm-payment-due {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 7px !important;
    }

    .stm-payment-due strong {
        font-size: 31px !important;
    }

    .stm-booking-payment-option {
        grid-template-columns: 38px minmax(0, 1fr) 22px;
        padding: 14px !important;
    }

    .stm-payment-option-icon,
    .stm-payment-method-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .stm-payment-method-card {
        padding: 18px !important;
    }

    details.stm-payment-bank-card {
        padding: 0 !important;
    }

    .stm-bank-summary {
        grid-template-columns: 38px minmax(0, 1fr) 26px;
        padding: 16px;
    }

    .stm-bank-method-body {
        padding: 0 16px 16px;
    }

    .stm-bank-details {
        grid-template-columns: 1fr !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stm-booking-payment-option,
    .stm-booking-addon-row,
    .stm-bank-summary-toggle,
    .stm-direct-booking-form input,
    .stm-direct-booking-form select,
    .stm-direct-booking-form textarea {
        transition: none !important;
    }
}

/* Radio state fallback and keyboard focus for browsers/themes with limited :has styling. */
.stm-booking-payment-option input:checked + .stm-payment-option-icon {
    background: var(--stm-pay-primary);
    color: #fff;
}
.stm-booking-payment-option input:checked ~ .stm-payment-option-check {
    border-color: var(--stm-pay-primary);
    background: var(--stm-pay-primary);
    color: #fff;
}
.stm-booking-payment-option input:focus-visible + .stm-payment-option-icon {
    box-shadow: 0 0 0 3px rgba(38, 57, 103, .15);
}
