/* =============================================================================
   Booking Form Page – booking.css
   Version: 3 – 2026-06-19
   ============================================================================= */

/* ── GP overrides ─────────────────────────────────────────────────────────── */
.booking-page .inside-article { padding: 0 !important; }
.booking-page .entry-header, .booking-page .entry-footer { display: none !important; }
.booking-page .content-area, .booking-page #primary {
    width: 100% !important; max-width: 100% !important;
    padding: 0 !important; margin: 0 !important;
}
.booking-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

/* ── Back + Title ─────────────────────────────────────────────────────────── */
.booking-back { padding: 20px 0 0; }
.booking-page__title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: #1d2327;
    margin: 12px 0 24px;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* ── Steps ────────────────────────────────────────────────────────────────── */
.booking-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.booking-step {
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s;
}
.booking-step:not(.booking-step--locked) { border-color: var(--color-primary, #004f80); }
.booking-step--locked .booking-step__header { cursor: default; }

.booking-step__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: #fff;
}
.booking-step__num {
    width: 32px;
    height: 32px;
    background: var(--color-primary, #004f80);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.booking-step--locked .booking-step__num { background: #c3c4c7; }
.booking-step__title {
    font-size: 17px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
}

.booking-step__body {
    padding: 0 24px 24px;
    border-top: 1px solid #e2e4e7;
}
/* Remove border-top when step is the first visible element */
.booking-step:not(.booking-step--locked) > .booking-step__body {
    border-top-color: #e2e4e7;
}

/* ── Form fields ──────────────────────────────────────────────────────────── */
.booking-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.booking-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}
.booking-field input[type="text"],
.booking-field input[type="email"],
.booking-field input[type="number"],
.booking-field input[type="date"],
.booking-field textarea {
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.booking-field input:focus,
.booking-field textarea:focus {
    outline: none;
    border-color: var(--color-primary, #004f80);
    box-shadow: 0 0 0 3px rgba(0,79,128,.10);
}
.booking-field textarea { resize: vertical; min-height: 120px; }

.booking-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Select with floating label (as per FIGMA) */
.booking-select-wrap {
    position: relative;
}
/* Floating label — visible when label is inside the wrap */
.booking-select-wrap .booking-field-label {
    position: absolute;
    top: 7px;
    left: 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-neutrals-700, #7a7a7a);
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}
/* Select with floating label: extra top padding to make room */
.booking-select-wrap:has(.booking-field-label) select {
    padding-top: 22px;
    padding-bottom: 6px;
}
/* Adjust chevron position when floating label is present */
.booking-select-wrap:has(.booking-field-label) i {
    top: 55%;
}
.booking-select-wrap select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    appearance: none;
    cursor: pointer;
    transition: border-color .15s;
}
.booking-select-wrap select:focus {
    outline: none;
    border-color: var(--color-primary, #004f80);
    box-shadow: 0 0 0 3px rgba(0,79,128,.10);
}
.booking-select-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 12px;
    pointer-events: none;
}

/* Checkbox */
.booking-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #3c434a;
    margin-bottom: 12px;
}
.booking-checkbox input { margin-top: 2px; flex-shrink: 0; accent-color: var(--color-primary, #004f80); }
.booking-terms a { color: var(--color-primary, #004f80); font-weight: 600; }

/* Captcha */
.booking-captcha {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    font-size: 14px;
    flex-wrap: wrap;
}

/* Step actions */
.booking-step__actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* ── Accommodation cards ──────────────────────────────────────────────────── */
.booking-accom-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.booking-accom-card {
    border: 2px solid #e2e4e7;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.booking-accom-card:hover { border-color: var(--color-primary, #004f80); }
.booking-accom-card.selected { border-color: var(--color-primary, #004f80); box-shadow: 0 0 0 2px rgba(0,79,128,.15); }
.booking-accom-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.booking-accom-card__body { padding: 10px 12px; }
.booking-accom-card__body strong { display: block; font-size: 13px; color: #1d2327; margin-bottom: 6px; }
.booking-accom-card__price {
    font-size: 12px;
    color: #646970;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 2px;
}
.booking-accom-card__price:hover { background: #f0f6fc; }
.booking-accom-card__price.selected { background: #e8f0fe; color: var(--color-primary, #004f80); font-weight: 600; }
.booking-accom-card__price-label { display: block; font-size: 11px; color: #9ca3af; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, color .2s;
    border: 2px solid transparent;
    font-family: inherit;
}
.btn-primary {
    background: var(--color-primary, #004f80);
    color: #fff;
    border-color: var(--color-primary, #004f80);
}
.btn-primary:hover { background: #003a60; border-color: #003a60; }
.btn-primary:disabled { background: #c3c4c7; border-color: #c3c4c7; cursor: not-allowed; }
.btn-outline {
    background: #fff;
    color: var(--color-primary, #004f80);
    border-color: var(--color-primary, #004f80);
}
.btn-outline:hover { background: var(--color-primary, #004f80); color: #fff; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.booking-sidebar { position: sticky; top: 100px; }
.booking-sidebar__card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    margin-bottom: 12px;
}
.bk-sidebar__course-name {
    font-size: 15px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 14px;
    line-height: 1.3;
}
.bk-sb-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #3c434a;
    margin-bottom: 8px;
}
.bk-sb-line span:first-child { flex: 1; }
/* nowrap is only for the price column (e.g. "US$275.00"); it must NOT
   apply to the self-booking note line, whose longer text needs to wrap.
   Excluding .bk-sb-line--note here is the root-cause fix — the note span
   is no longer matched by this rule at all. See page-booking.php. */
.bk-sb-line:not(.bk-sb-line--note) span:last-child { font-weight: 600; white-space: nowrap; }
.bk-sidebar__divider {
    border: none;
    border-top: 1px solid #e2e4e7;
    margin: 14px 0;
}
.bk-sidebar__total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: #1d2327;
}
.booking-sidebar__note {
    background: #e8f0fe;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #1d4689;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}
.booking-sidebar__note i { flex-shrink: 0; margin-top: 2px; }

/* ── Success ──────────────────────────────────────────────────────────────── */
.booking-success {
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
}
.booking-success .fa-check-circle { font-size: 48px; color: #28a745; margin-bottom: 16px; }
.booking-success h2 { font-size: 24px; color: #1d2327; margin: 0 0 12px; }
.booking-success p { font-size: 15px; color: #3c434a; margin: 0 0 8px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .booking-layout { grid-template-columns: 1fr; }
    .booking-sidebar { position: static; margin-bottom: 16px; order: -1; }
}
@media (max-width: 600px) {
    .booking-field-row { grid-template-columns: 1fr; }
    .booking-accom-cards { grid-template-columns: 1fr 1fr; }
    .booking-step__body { padding: 0 16px 16px; }
    .booking-step__header { padding: 14px 16px; }
}
