/* =========================================
   AIRBNB-STYLE BOOKING PAGE (Final V7)
   - Upgraded UI
   - Full circle date selection
   - Larger First/Last name spacing
   - Working guest & date modals
   ========================================= */
:root {
    --bnb-dark: #222222;
    --bnb-gray: #717171;
    --bnb-light-gray: #dddddd;
    --bnb-red: #ef4444; /* inherit from theme primary */
    --bnb-radius: 12px;
    --bnb-shadow-card: 0 6px 16px rgba(0,0,0,0.12);
    --bnb-font: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --input-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Shell / Page */
.booking-shell {
    background: #fafafa;
    color: var(--bnb-dark);
    padding: 40px 24px 80px;
    font-family: var(--bnb-font);
}

.booking-container-max {
    max-width: 1120px;
    margin: 0 auto;
}

/* Header */
.booking-header-minimal {
    margin-bottom: 32px;
    padding-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #ebebeb;
}
.booking-header-minimal h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bnb-dark);
    margin: 0;
    letter-spacing: -0.02em;
}
.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ebebeb;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.back-btn:hover {
    background: #f7f7f7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

/* Layout */
.booking-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    position: relative;
    width: 100%;
    max-width: 1120px;
}

/* Left column card */
.booking-left-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}
.booking-form {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 24px 24px 32px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Sections */
.section-bnb {
    margin-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 32px;
}
.section-bnb:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.section-bnb h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--bnb-dark);
}

/* --- MERGED DATES INPUT --- */
.bnb-merged-dates {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--input-shadow);
    background: #ffffff;
    transition: 0.18s ease;
    width: 100%;
    box-sizing: border-box;
}
.bnb-merged-dates:focus-within {
    border-color: var(--bnb-dark);
    box-shadow: 0 0 0 2px rgba(15,23,42,0.8);
}
.date-half {
    flex: 1;
    position: relative;
    padding: 12px 16px;
    cursor: pointer;
}
.date-half:first-child {
    border-right: 1px solid #e5e7eb;
}
.date-half:hover {
    background: #f8fafc;
}
.date-half label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--bnb-dark);
    margin-bottom: 2px;
    letter-spacing: 0.04em;
}
.date-half input {
    width: 100%;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    color: var(--bnb-gray);
    background: transparent;
    cursor: pointer;
    outline: none;
}
.date-half input[value]:not([value=""]) {
    color: var(--bnb-dark);
}

/* --- INPUTS & SEPARATION --- */

/* 1. General Input Style */
.bnb-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--bnb-dark);
    background: #ffffff;
    box-shadow: var(--input-shadow);
    transition: all 0.16s ease;
    box-sizing: border-box;
}
.bnb-input:focus {
    outline: none;
    border-color: var(--bnb-dark);
    box-shadow: 0 0 0 2px rgba(15,23,42,0.85);
}
.bnb-input.trigger {
    cursor: pointer;
    caret-color: transparent;
}
.bnb-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bnb-dark);
    margin-bottom: 8px;
}

/* 2. Larger spacing between First / Last name */
.split-name-row {
    display: flex;
    width: 100%;
    margin-bottom: 24px;
    column-gap: 40px;
}
.bnb-input-group {
    flex: 1;
}
.split-name-row .bnb-input-group:first-child {
    margin-right: 0 !important;
}

/* 3. General Grid for other inputs */
.bnb-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

/* --- SUMMARY CARD --- */
.booking-sidebar-sticky {
    position: sticky;
    top: 40px;
    height: fit-content;
}
.summary-card-bnb {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: var(--bnb-shadow-card);
    padding: 20px 20px 24px;
}
.card-header-bnb {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}
.card-thumb {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
    background: #e5e7eb;
}
.card-meta span:first-child {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.card-meta h2 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bnb-dark);
    margin: 4px 0 6px;
}
.card-meta span:last-child {
    font-size: 0.9rem;
}
.price-breakdown {
    margin-bottom: 20px;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--bnb-dark);
}
.breakdown-row span {
    color: #4b5563;
}
.breakdown-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--bnb-dark);
}
.btn-bnb-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--bnb-red), #dc2626);
    color: white;
    padding: 15px 22px;
    border: none;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
    margin-top: 8px;
}
.btn-bnb-primary:hover {
    filter: brightness(1.03);
    box-shadow: 0 10px 25px rgba(248,113,113,0.45);
}
.btn-bnb-primary:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(248,113,113,0.35);
}

/* --- MODALS (generic) --- */
.modal-bnb {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal-bnb.open {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(2px);
}
.modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 18px 45px rgba(15,23,42,0.25);
    animation: modalUp 0.25s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}
.modal-dialog.date-dialog {
    max-width: 860px;
    padding: 24px 28px 28px;
}
@keyframes modalUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- GUEST MODAL STYLES --- */
.guest-modal-content {
    padding: 20px 24px 8px;
}
.guest-modal-header {
    margin-bottom: 12px;
    padding-right: 32px;
}
.guest-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.guest-modal-header p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}
.guest-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
}
.guest-close-x:hover {
    background: #f3f4f6;
}
.guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}
.guest-row:first-of-type {
    padding-top: 8px;
}
.guest-row:last-of-type {
    border-bottom: none;
}
.guest-label strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bnb-dark);
}
.guest-label span {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}
.guest-label .link {
    text-decoration: underline;
    color: var(--bnb-dark);
    cursor: pointer;
    font-weight: 600;
}
.guest-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}
.counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: white;
    color: #4b5563;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.16s;
    padding-bottom: 2px;
}
.counter-btn:hover:not(:disabled) {
    border-color: var(--bnb-dark);
    color: var(--bnb-dark);
    background: #f9fafb;
}
.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #e5e7eb;
}
.counter-val {
    width: 24px;
    text-align: center;
    font-size: 1rem;
    color: var(--bnb-dark);
}
.guest-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 16px;
    border-top: 1px solid #f1f5f9;
}
.btn-link {
    background: none;
    border: none;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    color: #374151;
}
.btn-dark-pill {
    background: var(--bnb-dark);
    color: white;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

/* --- DATE MODAL HEADER BUTTONS --- */
.date-dialog-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}
.date-dialog-header .counter-btn {
    border-radius: 999px;
}

/* --- CALENDAR --- */
.date-dual-container {
    display: flex;
    gap: 40px;
}
.calendar-pane {
    width: 320px;
}
.calendar-month-name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}
.date-grid-header,
.date-grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}
.date-grid-header span {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 8px;
}

/* Base calendar cell */
.date-cell {
    height: 44px;
    width: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    margin: 2px auto;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-radius 0.18s ease;
}
.date-cell:hover:not(:disabled):not(.in-range):not(.range-start):not(.range-end) {
    border-radius: 50%;
    box-shadow: 0 0 0 1px #111827;
}
.date-cell:disabled {
    color: #e5e7eb;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* In-Range (grey band) */
.date-cell.in-range {
    background: #f3f4f6;
    color: var(--bnb-dark);
    border-radius: 0;
}

/* Start & End = FULL CIRCLE */
.date-cell.range-start,
.date-cell.range-end {
    background: #111827 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #111827;
    z-index: 3 !important;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .booking-shell {
        padding: 24px 16px 48px;
    }
    .booking-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .booking-sidebar-sticky {
        position: static;
        order: -1;
    }
    .summary-card-bnb {
        margin-bottom: 8px;
    }
    .date-dual-container {
        flex-direction: column;
        gap: 24px;
    }
    .calendar-pane {
        width: 100%;
    }
    .date-cell {
        width: 100%;
    }
    .split-name-row {
        flex-direction: column;
        column-gap: 0;
    }
    .split-name-row .bnb-input-group {
        margin-bottom: 24px;
    }
}
