/* =====================================================================
   Cek Pesanan (/travel/book/check)
   Markup : plugins/FrontEnd/src/Template/Bookings/check_order.ctp
            + kartu hasil dari Element/Bookings/js-check-order.ctp
   Token warna/radius & komponen dasar (rs-co-*, rs-btn, rs-seg, rs-kv,
   rs-callout, rs-sum-tear) dari modern-checkout.css di bundel. Dimuat
   hanya di halaman ini (Layout/frontend.ctp), jadi TIDAK perlu
   build_frontend_css_bundle. montserrat-override.css memaksa
   font-weight 400 !important: setiap bobot huruf di sini !important.
   ===================================================================== */

.rs-check [hidden] {
    display: none !important;
}

.rs-check .rs-co-narrow {
    max-width: 600px;
}

/* ---------- Form ---------- */
.rs-check-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rs-check-mode {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.rs-check .rs-check-mode .rs-co-label {
    margin: 0;
    color: var(--co-muted);
    font-weight: 500 !important;
}

.rs-check-mode .rs-seg span {
    padding: 9px 16px;
}

.rs-check .rs-check-code-input {
    height: 52px;
    font-size: 20px;
    font-weight: 600 !important;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.rs-check .rs-check-code-input::placeholder {
    color: #a3a9b5;
    font-size: 15px;
    font-weight: 400 !important;
    letter-spacing: normal;
    text-transform: none;
}

.rs-check .rs-co-field.has-error .rs-co-hint {
    display: none;
}

.rs-check-panel > .rs-co-hint {
    margin-top: 10px;
}

.rs-check-submit .fa-solid {
    font-size: 14px;
}

.rs-check-submit.is-busy .fa-solid {
    -webkit-animation: rs-check-pulse 0.9s ease-in-out infinite alternate;
    animation: rs-check-pulse 0.9s ease-in-out infinite alternate;
}

@-webkit-keyframes rs-check-pulse {
    to { opacity: 0.35; }
}

@keyframes rs-check-pulse {
    to { opacity: 0.35; }
}

/* ---------- Hasil ---------- */
.rs-check-result {
    margin-top: 22px;
    outline: none;
    /* navbar melayang (Element/modern-navbar, tinggi 70px) */
    scroll-margin-top: 90px;
}

.rs-check-result:empty {
    display: none;
}

.rs-check .rs-check-count {
    margin: 0 0 10px !important;
    color: var(--co-muted);
    font-size: 13.5px;
    font-weight: 600 !important;
}

.rs-check-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rs-check-item {
    overflow: hidden;
    border-radius: var(--co-radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(29, 36, 51, 0.06), 0 6px 18px rgba(29, 36, 51, 0.06);
}

.rs-check-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 14px;
}

.rs-check-code-value {
    display: block;
    margin-top: 2px;
    font-size: 21px;
    font-weight: 700 !important;
    line-height: 1.2;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.rs-check-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600 !important;
    line-height: 1.3;
    white-space: nowrap;
}

.rs-check-chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.rs-check-chip--paid {
    background: var(--co-green-soft);
    color: var(--co-green);
}

.rs-check-chip--processing {
    background: #eef4ff;
    color: #1d4ed8;
}

.rs-check-chip--pending {
    background: var(--co-amber-soft);
    color: var(--co-amber);
}

.rs-check-chip--cancelled {
    background: var(--co-mist);
    color: var(--co-muted);
}

.rs-check-item-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px 4px;
}

.rs-check-leg {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rs-check-leg-tag {
    align-self: flex-start;
    margin-bottom: 2px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--co-red-soft);
    color: var(--co-red-deep);
    font-size: 11.5px;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

.rs-check-route {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 17px;
    font-weight: 700 !important;
    line-height: 1.3;
}

.rs-check-route .fa-solid {
    color: var(--co-red);
    font-size: 13px;
}

.rs-check-when {
    color: #4b5263;
    font-size: 14px;
}

.rs-check-kv {
    padding-top: 12px;
    border-top: 1px solid var(--co-line);
}

.rs-check-item-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px 18px;
}

.rs-check-item-foot .rs-btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 14.5px;
}

.rs-check-item--cancelled .rs-check-code-value,
.rs-check-item--cancelled .rs-check-route {
    color: var(--co-muted);
}

/* ---------- Tidak ditemukan / galat ---------- */
.rs-check-empty {
    text-align: center;
}

.rs-check-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--co-red-soft);
    color: var(--co-red);
    font-size: 20px;
}

.rs-check .rs-check-empty h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700 !important;
}

.rs-check-empty ul,
.rs-check-help ul {
    margin: 0 0 14px;
    padding-left: 18px;
    color: #4b5263;
    font-size: 13.5px;
    line-height: 1.6;
    text-align: left;
}

.rs-check-empty ul {
    display: inline-block;
    max-width: 44ch;
}

.rs-check-error {
    align-items: flex-start;
}

/* ---------- Bantuan ---------- */
.rs-check-help {
    margin-top: 28px;
    padding: 0 4px;
}

.rs-check-help .rs-link .fa-brands {
    margin-right: 4px;
    font-size: 16px;
}

/* ---------- HP ---------- */
@media (max-width: 599px) {
    .rs-check-mode {
        flex-direction: column;
        align-items: stretch;
    }

    .rs-check-mode .rs-seg {
        display: flex;
    }

    .rs-check-mode .rs-seg label {
        flex: 1 1 0;
        text-align: center;
    }

    .rs-check-mode .rs-seg span {
        padding: 9px 8px;
    }

    .rs-check-item-head,
    .rs-check-item-body,
    .rs-check-item-foot {
        padding-right: 16px;
        padding-left: 16px;
    }

    .rs-check-item-head {
        align-items: flex-start;
    }

    .rs-check-code-value {
        font-size: 19px;
    }

    .rs-check-item-foot {
        flex-direction: column;
    }

    .rs-check-item-foot .rs-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs-check-submit.is-busy .fa-solid {
        -webkit-animation: none;
        animation: none;
    }
}
