/* ===========================================================================
   Quick booking widget
   ===========================================================================
   Sidebar booking on a trip page, shaped like a flight or hotel checkout: one
   decision per screen, the price always visible, and the deposit stated before
   anything is asked for.

   Palette follows the site: #ef8821 for actions, #3c59a7 for structure.
   ========================================================================= */
.qb {
    position: relative;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 5px;
    box-shadow: 0 2px 14px rgba(26, 43, 72, .07);
    overflow: hidden;
    font-size: 14.5px;
    color: #1a2b48;
}

/* ----------------------------------------------------------------- header */
.qb-head {
    padding: 16px 18px;
    background: #3c59a7;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.qb-from span   { display: block; font-size: 11.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.qb-from strong { font-size: 26px; font-weight: 700; line-height: 1.1; }
.qb-from small  { font-size: 12px; opacity: .85; margin-left: 4px; }
.qb-badge {
    background: #ef8821; color: #16202b;
    padding: 5px 11px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}

/* ------------------------------------------------------------------- rail */
.qb-rail {
    display: flex; list-style: none; margin: 0; padding: 12px 18px 0; gap: 4px;
    counter-reset: qb;
}
.qb-pip { flex: 1; position: relative; padding-top: 16px; counter-increment: qb; }
.qb-pip::before {
    content: ''; position: absolute; top: 0; left: 0; right: 2px; height: 3px;
    background: #e3e6ec; border-radius: 2px; transition: background .2s ease;
}
.qb-pip.is-on::before { background: #ef8821; }
.qb-pip span { font-size: 10.5px; color: #8a919c; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.qb-pip.is-on span { color: #3c59a7; }

/* ------------------------------------------------------------------ steps */
.qb-step { padding: 14px 18px 4px; }
.qb-step[hidden] { display: none; }
.qb-step h4 { font-size: 15.5px; font-weight: 700; margin: 0 0 12px; color: #1a2b48; }

.qb-field { margin-bottom: 12px; }
.qb-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.qb-field input {
    width: 100%; padding: 10px 12px; font: inherit; font-size: 14.5px;
    border: 1px solid #d7dce3; border-radius: 3px; color: #1a2b48;
}
.qb-field input:focus { outline: none; border-color: #ef8821; box-shadow: 0 0 0 3px rgba(239,136,33,.16); }
.qb-field small { display: block; margin-top: 5px; font-size: 12px; color: #8a919c; }

/* ------------------------------------------------------------------ dates */
.qb-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.qb-date { position: relative; cursor: pointer; }
.qb-date input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.qb-date-in {
    display: block; text-align: center; padding: 9px 4px;
    border: 1px solid #d7dce3; border-radius: 4px;
    transition: border-color .12s ease, background .12s ease;
}
.qb-date-in strong { display: block; font-size: 14px; }
.qb-date-in small  { display: block; font-size: 11px; color: #8a919c; }
.qb-date-in em     { display: block; font-size: 11px; font-style: normal; color: #ef8821; font-weight: 700; }
.qb-date:hover .qb-date-in { border-color: #ef8821; }
.qb-date input:checked + .qb-date-in { border-color: #ef8821; background: rgba(239,136,33,.08); }
.qb-date input:focus-visible + .qb-date-in { outline: 2px solid #3c59a7; outline-offset: 2px; }

.qb-alt { margin: 12px 0 0; font-size: 13px; color: #5a6472; }
.qb-alt label { margin-left: 6px; cursor: pointer; }

/* ----------------------------------------------------------------- guests */
.qb-count { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 6px 0 14px; }
.qb-count input {
    width: 64px; text-align: center; font-size: 20px; font-weight: 700;
    border: 1px solid #d7dce3; border-radius: 4px; padding: 7px; color: #1a2b48;
    /* Driven by the buttons; typing an arbitrary number is how you get 999. */
    pointer-events: none; background: #fff;
}
.qb-minus, .qb-plus {
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    border: 1px solid #d7dce3; background: #fff; font-size: 20px; line-height: 1; color: #3c59a7;
}
.qb-minus:hover, .qb-plus:hover { border-color: #ef8821; color: #ef8821; }
.qb-minus[disabled], .qb-plus[disabled] { opacity: .4; cursor: not-allowed; }

.qb-note { font-size: 12.5px; color: #8a919c; margin: 0 0 10px; text-align: center; }

/* ------------------------------------------------------- running subtotal */
.qb-sum, .qb-review {
    background: #f4f6fb; border-radius: 4px; padding: 12px 14px;
    font-size: 13.5px; margin: 0;
}
.qb-sum .r, .qb-review .r { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.qb-sum .r.total, .qb-review .r.total {
    border-top: 1px solid #dde3ee; margin-top: 7px; padding-top: 9px;
    font-weight: 700; font-size: 15px; color: #3c59a7;
}
.qb-sum .r.due, .qb-review .r.due { color: #ef8821; font-weight: 700; }
.qb-sum .muted, .qb-review .muted { color: #8a919c; font-size: 12.5px; }

.qb-terms { font-size: 12px; color: #8a919c; margin: 12px 0 0; line-height: 1.5; }

/* ---------------------------------------------------------------- actions */
.qb-actions { display: flex; gap: 8px; padding: 14px 18px 16px; }
.qb-back, .qb-next, .qb-go {
    font: inherit; font-size: 14.5px; font-weight: 600; border-radius: 3px;
    padding: 12px 16px; cursor: pointer; border: 1px solid transparent;
}
.qb-back { background: #fff; border-color: #d7dce3; color: #5a6472; flex: 0 0 auto; }
.qb-back:hover { border-color: #3c59a7; color: #3c59a7; }
.qb-next, .qb-go { flex: 1; background: #ef8821; color: #16202b; }
.qb-next:hover, .qb-go:hover { filter: brightness(.94); }
.qb-go[disabled] { opacity: .6; cursor: progress; }
.qb-back[hidden], .qb-next[hidden], .qb-go[hidden] { display: none; }

.qb-error {
    margin: 0 18px 14px; padding: 9px 12px; border-radius: 3px;
    background: #fdecea; color: #b3261e; font-size: 13px;
}

.qb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- loading */
.qb-loading {
    position: absolute; inset: 0; z-index: 5;
    background: rgba(255, 255, 255, .96);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; text-align: center; padding: 20px;
}
.qb-loading[hidden] { display: none; }
.qb-loading p     { margin: 10px 0 0; font-weight: 600; color: #3c59a7; }
.qb-loading small { color: #8a919c; font-size: 12.5px; }
.qb-spinner {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid #e3e6ec; border-top-color: #ef8821;
    animation: qb-spin .8s linear infinite;
}
@keyframes qb-spin { to { transform: rotate(360deg) } }

/* ------------------------------------------------------------------ trust */
.qb-trust {
    border-top: 1px solid #eef1f4; padding: 11px 18px;
    display: flex; flex-direction: column; gap: 3px;
    font-size: 11.5px; color: #5a6472; background: #fbfcfe;
}

@media (prefers-reduced-motion: reduce) {
    .qb-spinner { animation-duration: 2.4s; }
    .qb-pip::before { transition: none; }
}

/* The enquiry route, for a group or a date the widget cannot quote. */
.qb-ask {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e6e9ee;
    font-size: 13px;
    line-height: 1.5;
    color: #5e6b7a;
    text-align: center;
}
.qb-ask a { color: #3c59a7; font-weight: 600; text-decoration: underline; }
.qb-ask a:hover { color: #ef8821; }
