/* Booking Calendar Styles */
.calendar-container {
    margin: 2rem 0;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.booking-modal--page .calendar-container {
    margin: 1.35rem 0 2rem;
    border: 1px solid var(--nav-villa-border);
    border-radius: 18px;
    background: linear-gradient(
        165deg,
        rgba(255, 254, 251, 0.98) 0%,
        rgba(247, 241, 233, 0.65) 100%
    );
    box-shadow:
        0 8px 28px rgba(42, 35, 28, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.calendar-clear-selection-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 1rem;
}

.booking-modal--page .calendar-clear-selection-wrap {
    margin: 0 0 1.25rem;
}

.calendar-clear-selection-btn {
    min-width: 11.5rem;
    font-weight: 600;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.calendar-nav-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-month-year {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.5rem;
    font-size: 0.9rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    background: #fff;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.calendar-day:hover:not(.disabled):not(.booked) {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.calendar-day.today {
    background: var(--accent-color);
    color: white;
    font-weight: bold;
}

.calendar-day.disabled {
    color: var(--border-color);
    cursor: not-allowed;
    background: #f5f5f5;
}

.calendar-day.booked {
    background: #ffebee;
    color: #c62828;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
}

.calendar-day.booked.calendar-blocked {
    background: #ede7f6;
    color: #4527a0;
    text-decoration: none;
}

.calendar-day.booked.calendar-unavailable {
    background: #eceff1;
    color: #37474f;
    text-decoration: line-through;
}

.calendar-day.booked.calendar-blocked,
.calendar-day.booked.calendar-unavailable {
    cursor: not-allowed;
    pointer-events: none;
}

/* Exclusive checkout: night is booked for someone else, but valid as your departure day */
.calendar-day.booked.calendar-checkout-allowed {
    pointer-events: auto;
    cursor: pointer;
    text-decoration: none;
    outline-offset: 2px;
}

.calendar-day.booked.calendar-checkout-allowed:hover {
    filter: brightness(1.03);
}

.calendar-day.booked.calendar-pending-hold {
    background: linear-gradient(145deg, #fffaf0 0%, #ffe082 42%, #fff8e1 100%);
    color: #bf360c;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    border: 2px dashed rgba(191, 54, 12, 0.42);
    font-weight: 600;
}

.calendar-day.booked.calendar-pending-hold:hover {
    filter: brightness(1.03);
    border-color: rgba(191, 54, 12, 0.62);
}


.calendar-day.checkout-available {
    background: #fff;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    box-shadow: none;
    font-weight: 500;
    cursor: pointer;
    pointer-events: auto;
}

.calendar-day.checkout-available:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--text-dark);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

.calendar-day.in-range {
    background: rgba(26, 95, 122, 0.2);
    color: var(--primary-color);
}

.calendar-day.check-in {
    background: var(--primary-color);
    color: white;
    border-radius: 8px 0 0 8px;
}

.calendar-day.check-out {
    background: var(--primary-color);
    color: white;
    border-radius: 0 8px 8px 0;
}

.calendar-day.range-start {
    border-radius: 8px 0 0 8px;
}

.calendar-day.range-end {
    border-radius: 0 8px 8px 0;
}

/* Pricing holidays (admin calendar) — weekend-rate nights on marked dates */
.calendar-day.calendar-pricing-holiday {
    position: relative;
}

.calendar-day.calendar-pricing-holiday::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fbbf24, #d97706);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92);
    z-index: 1;
    pointer-events: none;
}

.calendar-day.calendar-pricing-holiday:not(.booked):not(.disabled) {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.92) 0%, #ffffff 72%);
    border-color: rgba(245, 158, 11, 0.48);
}

.calendar-day.calendar-pricing-holiday:not(.booked):not(.disabled):hover {
    border-color: rgba(217, 119, 6, 0.72);
}

.calendar-day.in-range.calendar-pricing-holiday:not(.booked):not(.disabled) {
    background: rgba(26, 95, 122, 0.18);
    border-color: rgba(245, 158, 11, 0.52);
    color: var(--primary-color);
}

.calendar-day.disabled.calendar-pricing-holiday::before {
    opacity: 0.45;
}

.calendar-day.today.calendar-pricing-holiday:not(.booked)::before {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.calendar-day.selected.calendar-pricing-holiday::before,
.calendar-day.check-in.calendar-pricing-holiday::before,
.calendar-day.check-out.calendar-pricing-holiday::before {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.98);
}

/* Calendar Navigation */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-btn:hover {
    border-color: var(--primary-color);
}

/* Date Range Display */
.selected-dates {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.date-display {
    flex: 1;
}

.date-display-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.date-display-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.date-display-value.empty {
    color: var(--text-light);
    font-style: italic;
}

/* Booking status — modal overlay (errors visible without scrolling) */
.booking-status-modal {
    position: fixed;
    inset: 0;
    z-index: 10090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.booking-status-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.booking-status-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    margin-top: 0 !important;
    padding: 1.25rem 1.35rem !important;
    text-align: left;
    box-shadow: var(--shadow-lg);
}

.booking-status-modal-message {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    line-height: 1.5;
    font-weight: 500;
}

.booking-status-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.booking-status-modal-dismiss {
    padding: 0.55rem 1.35rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--primary-color);
    color: #fff;
    transition: var(--transition);
}

.booking-status-modal-dismiss:hover {
    opacity: 0.92;
}

.booking-status-modal-panel.booking-status.error .booking-status-modal-dismiss {
    background: #c62828;
}

.booking-status-modal-panel.booking-status.success .booking-status-modal-dismiss {
    background: #2e7d32;
}

.booking-status-modal-panel.booking-status.info .booking-status-modal-dismiss {
    background: var(--primary-color);
}

/* Inline booking status (legacy — modal used instead) */
.booking-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.booking-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.booking-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.booking-status.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #42a5f5;
}

/* Loading State */
.calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Mobile Calendar Adjustments */
@media (max-width: 768px) {
    .calendar-container {
        padding: 1rem;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .calendar-day {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .calendar-day-header {
        font-size: 0.8rem;
        padding: 0.25rem;
    }

    .calendar-month-year {
        font-size: 1.1rem;
    }

    .selected-dates {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-view-toggle {
        justify-content: center;
    }
}

/* Calendar Animation */
@keyframes calendarFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-grid {
    animation: calendarFadeIn 0.3s ease;
}

/* Calendar Legend */
.calendar-legend {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.booking-modal--page .calendar-legend {
    background: rgba(255, 253, 249, 0.82);
    border: 1px solid rgba(74, 60, 48, 0.12);
    border-radius: 14px;
}

.booking-modal--page .legend-item {
    color: var(--nav-villa-ink-soft);
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.today-color {
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    line-height: 1;
}

.available-color {
    background: white;
    border: 2px solid var(--border-color);
}

.selected-color {
    background: var(--primary-color);
    color: white;
}

.in-range-color {
    background: rgba(26, 95, 122, 0.2);
    border: 2px solid var(--primary-color);
}

.booked-color {
    background: #ffebee;
    color: #c62828;
    text-decoration: line-through;
    position: relative;
}

.booked-color::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #c62828;
}

.pending-confirmation-color {
    background: linear-gradient(145deg, #fffaf0 0%, #ffe082 50%, #fff8e1 100%);
    border: 2px dashed rgba(191, 54, 12, 0.55);
}

.blocked-hold-color {
    background: #ede7f6;
    border: 2px solid #5e35b1;
}

.unavailable-cal-color {
    background: #eceff1;
    border: 2px solid #546e7a;
}

.disabled-color {
    background: #f5f5f5;
    border: 2px solid var(--border-color);
}

.pricing-holiday-color {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.92) 0%, #ffffff 72%);
    border: 2px solid rgba(245, 158, 11, 0.55);
    position: relative;
}

.pricing-holiday-color::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fbbf24, #d97706);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92);
}

/* Mobile Legend Adjustments */
@media (max-width: 768px) {
    .calendar-legend {
        padding: 0.5rem 0.75rem;
    }

    .legend-items {
        gap: 0.75rem;
        justify-content: flex-start;
    }

    .legend-item {
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }

    .today-color {
        font-size: 0.6rem;
    }
}

/* Full-page booking: tighter labels when six steps */
.booking-modal--page .step-indicator .step-label {
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
    max-width: 4rem;
}

@media (min-width: 768px) {
    .booking-modal--page .step-indicator .step-label {
        font-size: 0.78rem;
        max-width: none;
    }
}

.review-next-hint {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.payment-proof-intro {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.payment-proof-field {
    margin-bottom: 0.75rem;
}

.payment-proof-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.payment-proof-field input[type="file"] {
    width: 100%;
    max-width: 28rem;
    padding: 0.5rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    cursor: pointer;
}

.payment-proof-note {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Payment step — compact booking summary */
.payment-step-summary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.payment-step-summary h4 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.payment-summary-list {
    margin: 0;
    padding: 0;
}

.payment-summary-row {
    display: grid;
    grid-template-columns: minmax(7rem, 40%) 1fr;
    gap: 0.35rem 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}

.payment-summary-row:last-of-type {
    border-bottom: none;
}

.payment-summary-row dt {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
}

.payment-summary-row dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}

.payment-summary-highlight dd {
    font-size: 1.05rem;
    color: var(--primary-color);
}

.payment-summary-deposit dd {
    font-size: 1.05rem;
    color: #1565c0;
}

.payment-summary-note {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-light);
}

.bank-payment-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1.25rem;
}

.bank-payment-heading {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.bank-payment-steps {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-dark);
}

.bank-payment-steps li {
    margin-bottom: 0.45rem;
}

.bank-payment-steps li:last-child {
    margin-bottom: 0;
}

.bank-qr-figure {
    margin: 0;
    text-align: center;
}

.bank-qr-img {
    display: inline-block;
    max-width: min(280px, 85vw);
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.bank-qr-caption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (max-width: 420px) {
    .payment-summary-row {
        grid-template-columns: 1fr;
    }

    .payment-summary-row dd {
        text-align: left;
    }
}

/* Date selection confirmation (after check-in + check-out chosen) */
.dates-confirm-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.dates-confirm-overlay[hidden] {
    display: none !important;
}

.dates-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 35, 28, 0.42);
    backdrop-filter: blur(4px);
}

.dates-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: 1.6rem 1.4rem;
    background: linear-gradient(
        168deg,
        rgba(255, 254, 251, 0.98) 0%,
        rgba(241, 233, 223, 0.96) 100%
    );
    border-radius: 20px;
    box-shadow:
        0 18px 48px rgba(42, 35, 28, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    border: 1px solid var(--nav-villa-border);
}

.dates-confirm-panel h3 {
    margin: 0 0 0.35rem;
    font-size: 1.28rem;
    font-family: var(--font-heading);
    color: var(--nav-villa-ink);
    text-align: center;
}

.dates-confirm-lead {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--nav-villa-ink-soft);
}

.dates-confirm-list {
    margin: 0 0 1rem;
    padding: 0;
}

.dates-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(74, 60, 48, 0.1);
}

.dates-confirm-row:last-of-type {
    border-bottom: none;
}

.dates-confirm-row dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nav-villa-ink-soft);
}

.dates-confirm-row dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--nav-villa-ink);
    text-align: right;
}

.dates-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: stretch;
}

.dates-confirm-actions .btn-secondary,
.dates-confirm-actions .btn-primary {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 8rem;
    justify-content: center;
}

@media (max-width: 420px) {
    .dates-confirm-actions .btn-secondary,
    .dates-confirm-actions .btn-primary {
        flex-basis: 100%;
    }
}

/* Booking submit in progress — covers wizard card until thank-you */
.booking-submit-overlay {
    position: absolute;
    inset: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.booking-submit-overlay[hidden] {
    display: none !important;
}

.booking-submit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 35, 28, 0.48);
    backdrop-filter: blur(5px);
}

.booking-submit-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    padding: 1.75rem 1.5rem 1.6rem;
    text-align: center;
    background: linear-gradient(
        168deg,
        rgba(255, 254, 251, 0.99) 0%,
        rgba(241, 233, 223, 0.97) 100%
    );
    border-radius: 20px;
    box-shadow:
        0 18px 48px rgba(42, 35, 28, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    border: 1px solid var(--nav-villa-border);
}

.booking-submit-spinner {
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto 1.1rem;
    border: 3px solid rgba(74, 60, 48, 0.12);
    border-top-color: var(--nav-villa-ink, #4a3c30);
    border-radius: 50%;
    animation: booking-submit-spin 0.72s linear infinite;
}

@keyframes booking-submit-spin {
    to {
        transform: rotate(360deg);
    }
}

.booking-submit-title {
    margin: 0 0 0.5rem;
    font-size: 1.22rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--nav-villa-ink);
}

.booking-submit-message {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--nav-villa-ink-soft);
}

.booking-form .field-hint {
    margin: 0.4rem 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text-light);
}

/* Full-page booking — payment blocks & hints (villa shell) */
.booking-modal--page .review-next-hint {
    background: rgba(255, 253, 249, 0.88);
    border: 1px solid rgba(74, 60, 48, 0.1);
    border-radius: 14px;
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .payment-step-summary,
.booking-modal--page .bank-payment-panel {
    background: rgba(255, 253, 249, 0.78);
    border: 1px solid rgba(74, 60, 48, 0.12);
    border-radius: 16px;
}

.booking-modal--page .payment-step-summary h4,
.booking-modal--page .bank-payment-heading {
    color: var(--nav-villa-ink);
}

.booking-modal--page .payment-summary-row {
    border-bottom-color: rgba(74, 60, 48, 0.08);
}

.booking-modal--page .payment-summary-row dt {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .payment-summary-row dd {
    color: var(--nav-villa-ink);
}

.booking-modal--page .payment-summary-note {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .bank-payment-steps {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .bank-qr-img {
    border-color: rgba(74, 60, 48, 0.14);
}

.booking-modal--page .bank-qr-caption {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .payment-proof-intro,
.booking-modal--page .payment-proof-note {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .payment-proof-field input[type='file'] {
    border-color: rgba(74, 60, 48, 0.18);
    background: rgba(255, 253, 249, 0.92);
    border-radius: 12px;
}

.booking-modal--page .loading-message {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .booking-form .field-hint {
    color: var(--nav-villa-ink-soft);
}

.booking-modal--page .payment-amount-field input[type='number'] {
    max-width: 16rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 60, 48, 0.18);
    font-size: 1rem;
}

.booking-modal--page .payment-amount-hint {
    margin-top: 0.35rem;
}

/* -------------------------------------------------------------------------- */
/* Guest portal — lookup + read-only reservation (view-booking.html)         */
/* -------------------------------------------------------------------------- */

.guest-portal-main {
    padding-bottom: 2.5rem;
}

.guest-portal-card {
    max-width: 520px;
    margin: 0 auto 2rem;
    padding: 1.75rem 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--nav-villa-border);
    background: linear-gradient(
        165deg,
        rgba(255, 254, 251, 0.98) 0%,
        rgba(247, 241, 233, 0.65) 100%
    );
    box-shadow: 0 8px 28px rgba(42, 35, 28, 0.06), 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.guest-portal-details {
    max-width: min(900px, 100%);
}

/* Embed book.html calendar chrome without inheriting standalone modal viewport height */
.view-booking-reschedule-calendar-wrap.booking-modal.booking-modal--page {
    height: auto;
    min-height: 0;
    overflow: visible;
}

/* Softer nesting: reuse book.css calendar rules without a second heavy card chrome */
.view-booking-reschedule-calendar-wrap .modal-content.booking-container {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Match book.html cell sizing — aspect-ratio alone can collapse in tight nested flex layouts */
.view-booking-page-body .calendar-day {
    min-width: 0;
    min-height: 2.25rem;
    aspect-ratio: 1 / 1;
}

/* -------------------------------------------------------------------------- */
/* View booking — inline reschedule panel (below lookup / details cards)       */
/* -------------------------------------------------------------------------- */

.view-booking-reschedule-panel[hidden] {
    display: none !important;
}

.view-booking-reschedule-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(74, 60, 48, 0.1);
}

.view-booking-reschedule-panel-title {
    flex: 1 1 auto;
}

.view-booking-reschedule-panel-title.guest-portal-card-title {
    margin-bottom: 0;
}

.view-booking-reschedule-panel-body {
    min-width: 0;
}

.guest-portal-reschedule-picker-hint {
    margin: 1rem 0 0;
    font-size: 0.89rem;
    line-height: 1.52;
}

/* -------------------------------------------------------------------------- */
/* View booking — totals + Submit (opens after calendar range is ready)       */
/* -------------------------------------------------------------------------- */

.vb-reschedule-confirm-modal[hidden] {
    display: none !important;
}

.vb-reschedule-confirm-modal:not([hidden]) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 4000;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.vb-reschedule-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(25, 22, 18, 0.52);
    backdrop-filter: blur(5px);
}

.vb-reschedule-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: min(92vh, 100%);
    display: flex;
    flex-direction: column;
    margin: auto;
    border-radius: 20px;
    border: 1px solid var(--nav-villa-border);
    background: linear-gradient(
        165deg,
        rgba(255, 254, 251, 0.99) 0%,
        rgba(247, 241, 233, 0.96) 100%
    );
    box-shadow:
        0 24px 64px rgba(42, 35, 28, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.vb-reschedule-confirm-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1rem 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(74, 60, 48, 0.1);
    flex-shrink: 0;
}

.vb-reschedule-confirm-title {
    margin: 0;
    font-family: var(--font-heading, inherit);
    font-size: clamp(1.02rem, 2.8vw, 1.22rem);
    font-weight: 700;
    color: var(--nav-villa-ink, var(--text-dark));
    line-height: 1.35;
    padding-right: 0.25rem;
}

.vb-reschedule-confirm-close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    margin: -0.2rem -0.35rem 0 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--nav-villa-ink-soft);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.vb-reschedule-confirm-close:hover {
    background: rgba(74, 60, 48, 0.08);
    color: var(--nav-villa-ink);
}

.vb-reschedule-confirm-body {
    padding: 1rem 1.35rem 1.35rem;
    overflow-y: auto;
    min-height: 0;
}

body.vb-reschedule-confirm-modal-open {
    overflow: hidden;
}

.guest-portal-reschedule-submit-error {
    margin: 0 0 0.85rem;
}

.vb-reschedule-confirm-actions {
    justify-content: flex-start;
}

.vb-reschedule-confirm-actions .btn-primary,
.vb-reschedule-confirm-actions .btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding-inline: 1rem 1.25rem;
}

/* -------------------------------------------------------------------------- */

.guest-portal-card-title {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.guest-portal-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guest-portal-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--nav-villa-ink);
}

.guest-portal-field input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 60, 48, 0.18);
    background: rgba(255, 253, 249, 0.92);
    font-size: 1rem;
}

.guest-portal-primary-btn {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.guest-portal-error {
    margin-top: 0.85rem;
    color: var(--danger-color, #b42318);
    font-size: 0.925rem;
}

.guest-portal-details-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.guest-portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(74, 60, 48, 0.16);
    background: rgba(255, 255, 255, 0.7);
}

.guest-portal-badge--pending {
    color: #92400e;
    border-color: rgba(251, 146, 60, 0.45);
    background: rgba(254, 243, 199, 0.6);
}

.guest-portal-badge--confirmed {
    color: #14532d;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(220, 252, 231, 0.7);
}

.guest-portal-badge--cancelled {
    color: #7f1d1d;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(254, 226, 226, 0.65);
}

.guest-portal-dl {
    margin: 0;
    padding: 0;
}

.guest-portal-dl > div {
    display: grid;
    grid-template-columns: minmax(8rem, 33%) 1fr;
    gap: 0.35rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(74, 60, 48, 0.08);
    font-size: 0.95rem;
}

.guest-portal-dl > div:last-of-type {
    border-bottom: none;
}

.guest-portal-dl dt {
    margin: 0;
    font-weight: 600;
    color: var(--nav-villa-ink-soft);
}

.guest-portal-dl dd {
    margin: 0;
    color: var(--nav-villa-ink);
    word-break: break-word;
}

.guest-portal-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.guest-portal-footnote {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--nav-villa-ink-soft);
}

.guest-portal-balance-note {
    margin: 0.45rem 0 0;
}

.guest-portal-muted {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--nav-villa-ink-soft);
}

.guest-portal-actions-stack {
    margin: 1rem 0 0;
}

/* Single optional CTA — don’t stretch to full card width like the lookup button */
.view-booking-page-body .guest-portal-change-dates-actions {
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.view-booking-page-body .guest-portal-change-dates-actions .btn-primary {
    width: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    padding-inline: 1rem 1.15rem;
}

/*
 * Author `display` on .guest-portal-change-dates-actions / .btn-primary beats the [hidden]
 * attribute’s default display:none (same/higher specificity). Force hidden to win.
 */
.view-booking-page-body #viewBookingChangeDatesActions[hidden],
.view-booking-page-body #viewBookingChangeDatesBtn[hidden] {
    display: none !important;
}

.guest-portal-reschedule-intro {
    margin: 0 0 0.85rem;
    font-size: 0.94rem;
    line-height: 1.55;
}

.guest-portal-reschedule-error {
    margin: 0 0 1rem;
}

.vb-reschedule-summary {
    margin-top: 0.85rem;
}

.guest-portal-reschedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
    justify-content: center;
}

.view-booking-page-body #calendarContainer {
    max-width: 100%;
}

@media (max-width: 520px) {
    .guest-portal-dl > div {
        grid-template-columns: 1fr;
    }

    .guest-portal-card {
        padding: 1.35rem 1.1rem;
    }
}
