/* ================================================================
   v22 responsive + sticky layout corrections
   This file intentionally loads last so these safety rules win over
   the older Laravel compatibility CSS.
   ================================================================ */

/* Keep the public navigation attached to the viewport while scrolling.
   overflow-x: clip avoids creating a scroll container that can interfere
   with position: sticky on some mobile browsers. */
html {
    max-width: 100%;
    overflow-x: clip;
}

body {
    max-width: 100%;
    overflow-x: clip;
}

.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 2000 !important;
    width: 100%;
}

/* The tour booking panel should remain visible while the tour content is
   being read. On phones it stays sticky too, but only after entering the
   booking section, rather than using a fixed overlay. */
.tour-main-grid {
    align-items: start;
}

.tour-booking-column {
    position: sticky !important;
    top: 92px !important;
    align-self: start;
    z-index: 20;
}

/* Payment: stack before the narrowest phone breakpoint. The previous
   760px breakpoint was too late for tablets, browser zoom, and some mobile
   viewport configurations. */
@media (max-width: 900px) {
    .payment-hero-grid,
    .payment-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .payment-summary {
        position: static !important;
        order: -1;
    }

    .payment-total-hero {
        max-width: none;
        width: 100%;
    }

    .payment-method-form,
    .offline-panel,
    .payment-summary {
        min-width: 0;
        width: 100%;
    }

    .payment-method-card {
        grid-template-columns: auto 44px minmax(0, 1fr) !important;
        align-items: start;
    }

    .payment-method-copy {
        min-width: 0;
    }

    .payment-method-copy strong,
    .payment-method-copy small {
        overflow-wrap: anywhere;
    }

    .payment-primary,
    .offline-submit {
        width: 100%;
    }

    .bank-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 66px;
    }

    .tour-booking-column {
        position: sticky !important;
        top: 76px !important;
        margin-top: 16px;
    }

    .tour-booking-card {
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .payment-hero {
        padding-top: 30px;
    }

    .payment-main {
        margin-top: -20px;
        padding-bottom: 70px;
    }

    .payment-method-form,
    .offline-panel,
    .payment-summary {
        border-radius: 18px;
    }

    .payment-method-card {
        grid-template-columns: auto 40px minmax(0, 1fr) !important;
        gap: 10px;
        padding: 15px;
    }

    .payment-method-arrow {
        display: none;
    }

    .payment-method-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .payment-method-copy strong {
        font-size: 13px;
        line-height: 1.35;
    }

    .payment-method-copy small {
        font-size: 10px;
        line-height: 1.55;
    }

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

    .offline-actions {
        grid-template-columns: 1fr;
    }

    .payment-summary h2 {
        font-size: 21px;
    }

    .summary-row {
        align-items: flex-start;
    }

    .summary-row strong {
        max-width: 60%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .payment-total-hero strong {
        font-size: clamp(28px, 8vw, 36px);
        overflow-wrap: anywhere;
    }
}

@media (max-width: 430px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .payment-method-card {
        grid-template-columns: 20px 36px minmax(0, 1fr) !important;
        gap: 8px;
        padding: 13px;
    }

    .payment-method-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 17px;
    }

    .payment-method-copy strong {
        font-size: 12px;
    }

    .payment-method-copy small {
        font-size: 9px;
    }

    .payment-method-card input {
        margin-top: 9px;
    }

    .payment-security {
        align-items: flex-start;
    }
}
