/**
 * Cloudstay Booking Widget Styles
 *
 * Sticky booking sidebar widget with card-style design
 *
 * @package Cloudstay
 * @since 1.3.0
 */

/* ========================================
   CSS Variables
   ======================================== */
.booking-widget {
    --bw-primary: var(--lp-booking-btn-bg, #222222);
    --bw-primary-hover: #333333;
    --bw-primary-text: var(--lp-booking-btn-text, #ffffff);
    --bw-accent: #e35323;
    --bw-background: var(--lp-booking-bg, #ffffff);
    --bw-text: #222222;
    --bw-text-muted: #6b7280;
    --bw-text-light: #9ca3af;
    --bw-label: var(--lp-booking-label, #4b5563);
    --bw-placeholder: var(--lp-booking-placeholder, #9ca3af);
    --bw-border: var(--lp-booking-input-border, #e5e7eb);
    --bw-border-hover: #d1d5db;
    --bw-input-bg: var(--lp-booking-input-bg, #ffffff);
    --bw-success: #16a34a;
    --bw-error: #dc2626;
    --bw-warning: #facc15;
    --bw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --bw-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --bw-radius: var(--lp-booking-radius, 0);
    --bw-font-family: var(--e-global-typography-text-font-family, inherit);
}

/* ========================================
   Base Container - Sticky Positioning
   ======================================== */
.booking-widget {
    position: sticky;
    top: 24px;
    z-index: 100;
    font-family: var(--bw-font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--bw-text);
}

/* Adjust sticky offset for admin bar */
.admin-bar .booking-widget {
    top: 56px;
}

@media (min-width: 783px) {
    .admin-bar .booking-widget {
        top: 56px;
    }
}

/* ========================================
   Card Container
   ======================================== */
.booking-widget__card {
    background: var(--bw-background);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    box-shadow: var(--bw-shadow-lg);
    padding: 24px;
    transition: box-shadow 0.3s ease;
}

.booking-widget__card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Compact mode */
.booking-widget--compact .booking-widget__card {
    padding: 16px;
}

/* ========================================
   Price Header
   ======================================== */
.booking-widget__price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.booking-widget__price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.booking-widget__price-from {
    font-size: 14px;
    color: var(--bw-text-muted);
}

.booking-widget__price-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--bw-text);
}

.booking-widget__price-period {
    font-size: 14px;
    color: var(--bw-text-muted);
}

.booking-widget__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.booking-widget__rating svg {
    flex-shrink: 0;
}

.booking-widget__rating-value {
    font-weight: 600;
    color: var(--bw-text);
}

.booking-widget__rating-count {
    color: var(--bw-text-muted);
}

/* ========================================
   Total Section (shown when dates selected)
   ======================================== */
.booking-widget__total-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bw-border);
}

.booking-widget__total-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.booking-widget__total-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.booking-widget__total-label {
    font-size: 14px;
    color: var(--bw-text-muted);
}

.booking-widget__total-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--bw-text);
}

.booking-widget__nights-count {
    font-size: 14px;
    color: var(--bw-text-muted);
}

/* ========================================
   Price Breakdown
   ======================================== */
.booking-widget__breakdown {
    margin-top: 16px;
}

.booking-widget__breakdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--bw-text);
    text-decoration: underline;
    transition: color 0.2s;
}

.booking-widget__breakdown-toggle:hover {
    color: var(--bw-primary-hover);
}

.booking-widget__breakdown-arrow {
    transition: transform 0.3s ease;
    color: var(--bw-text-muted);
}

.booking-widget__breakdown-toggle[aria-expanded="true"] .booking-widget__breakdown-arrow {
    transform: rotate(180deg);
}

.booking-widget__breakdown-details {
    padding-top: 12px;
    animation: bw-slide-down 0.3s ease;
}

@keyframes bw-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-widget__breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.booking-widget__breakdown-row--total {
    border-top: 1px solid var(--bw-border);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
}

.booking-widget__breakdown-row--discount .booking-widget__breakdown-value {
    color: var(--bw-success);
}

.booking-widget__breakdown-label {
    color: var(--bw-text-muted);
}

.booking-widget__breakdown-value {
    font-weight: 500;
    color: var(--bw-text);
}

/* ========================================
   Instant Book Badge
   ======================================== */
.booking-widget__instant-book {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
    background: #fef3c7;
    border-radius: var(--bw-radius);
    font-size: 13px;
    color: #92400e;
}

.booking-widget__instant-book svg {
    color: #f59e0b;
    flex-shrink: 0;
}

/* ========================================
   Date Selection
   ======================================== */
.booking-widget__dates {
    margin-bottom: 12px;
}

.booking-widget__dates-field {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    background: var(--bw-input-bg);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    overflow: hidden;
    transition: border-color 0.2s, background-color 0.2s;
}

.booking-widget__dates-field:hover {
    border-color: var(--bw-border-hover);
}

.booking-widget__dates-field:focus-within {
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 1px var(--bw-primary);
}

.booking-widget__date {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.booking-widget__date label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bw-label);
    margin-bottom: 4px;
}

.booking-widget__date-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--bw-text);
    text-align: left;
}

.booking-widget__date-value {
    color: var(--bw-text);
}

.booking-widget__date-value--placeholder,
.booking-widget__date-btn .booking-widget__date-value[data-placeholder]:empty::before {
    color: var(--bw-placeholder);
}

.booking-widget__date-btn svg {
    color: var(--bw-text-muted);
    flex-shrink: 0;
}

.booking-widget__date-separator {
    width: 1px;
    background: var(--bw-border);
    align-self: stretch;
}

/* ========================================
   Guest Selection
   ======================================== */
.booking-widget__guests {
    margin-bottom: 20px;
    position: relative;
}

.booking-widget__guests label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bw-label);
    margin-bottom: 4px;
}

.booking-widget__guests-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    background: var(--bw-input-bg);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--bw-text);
    transition: border-color 0.2s, background-color 0.2s;
}

.booking-widget__guests-btn:hover {
    border-color: var(--bw-border-hover);
}

.booking-widget__guests-btn:focus {
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 1px var(--bw-primary);
    outline: none;
}

.booking-widget__guests-btn svg {
    color: var(--bw-text-muted);
    flex-shrink: 0;
}

/* ========================================
   Guest Dropdown
   ======================================== */
.booking-widget__guest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 150;
    margin-top: 4px;
    background: var(--bw-background);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    box-shadow: var(--bw-shadow-lg);
    animation: bw-fade-in 0.2s ease;
}

@keyframes bw-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-widget__guest-dropdown-content {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    padding: 16px;
}

.booking-widget__guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--bw-border);
}

.booking-widget__guest-row:last-of-type {
    border-bottom: none;
}

.booking-widget__guest-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--bw-text);
    margin: 0 0 2px;
}

.booking-widget__guest-info p {
    font-size: 12px;
    color: var(--bw-text-muted);
    margin: 0;
}

.booking-widget__guest-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-widget__counter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: 1px solid var(--bw-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--bw-text);
    transition: all 0.2s;
}

.booking-widget__counter-btn:hover:not(:disabled) {
    border-color: var(--bw-primary);
    color: var(--bw-primary);
}

.booking-widget__counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.booking-widget__counter-value {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--bw-text);
}

.booking-widget__max-guests-notice {
    margin: 12px 0 0;
    padding: 0;
    font-size: 12px;
    color: var(--bw-text-muted);
}

.booking-widget__guest-dropdown-footer {
    padding-top: 12px;
    border-top: 1px solid var(--bw-border);
    margin-top: 8px;
    text-align: right;
}

.booking-widget__guest-close-btn {
    padding: 8px 16px;
    background: var(--bw-primary);
    border: none;
    border-radius: var(--bw-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    transition: background 0.2s;
}

.booking-widget__guest-close-btn:hover {
    background: var(--bw-primary-hover);
}

/* ========================================
   Loading State
   ======================================== */
.booking-widget__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--bw-background);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
}

.booking-widget__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bw-border);
    border-top-color: var(--bw-primary);
    border-radius: 50%;
    animation: bw-spin 0.8s linear infinite;
}

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

.booking-widget__loading span {
    font-size: 14px;
    color: var(--bw-text-muted);
}

/* Loading Skeleton States */
.booking-widget__skeleton {
    background: linear-gradient(
        90deg,
        #EAEAEA 0%,
        #f5f5f5 50%,
        #EAEAEA 100%
    );
    background-size: 200% 100%;
    animation: bw-skeleton 1.2s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes bw-skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.booking-widget__skeleton--price {
    height: 32px;
    width: 120px;
}

.booking-widget__skeleton--date {
    height: 44px;
    width: 100%;
}

.booking-widget__skeleton--button {
    height: 52px;
    width: 100%;
}

/* ========================================
   Error State
   ======================================== */
.booking-widget__error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--bw-radius);
}

.booking-widget__error svg {
    flex-shrink: 0;
    color: var(--bw-error);
}

.booking-widget__error-message {
    font-size: 14px;
    color: var(--bw-error);
    line-height: 1.4;
}

/* ========================================
   Action Buttons
   ======================================== */
.booking-widget__actions {
    margin-bottom: 16px;
}

.booking-widget__reserve-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: var(--bw-primary);
    border: none;
    border-radius: var(--bw-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bw-primary-text);
    transition: background 0.2s, transform 0.1s;
}

.booking-widget__reserve-btn:hover {
    background: var(--bw-primary-hover);
}

.booking-widget__reserve-btn:active {
    transform: scale(0.98);
}

.booking-widget__reserve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.booking-widget__reserve-btn svg {
    flex-shrink: 0;
    color: var(--bw-warning);
}

/* Enquiry Button (when instant_book is false) */
.booking-widget__enquiry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: var(--bw-primary);
    border: none;
    border-radius: var(--bw-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bw-primary-text);
    transition: background 0.2s, transform 0.1s;
}

.booking-widget__enquiry-btn:hover {
    background: var(--bw-primary-hover);
}

.booking-widget__enquiry-btn:active {
    transform: scale(0.98);
}

.booking-widget__enquiry-btn svg {
    flex-shrink: 0;
}

.booking-widget__notice {
    margin: 12px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--bw-text-muted);
    text-align: center;
}

/* ========================================
   Discounts Section
   ======================================== */
.booking-widget__discounts {
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--bw-radius);
}

.booking-widget__discounts-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bw-success);
}

.booking-widget__discounts-header svg {
    flex-shrink: 0;
}

.booking-widget__discounts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.booking-widget__discounts-list li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--bw-text-muted);
}

.booking-widget__discounts-list strong {
    color: var(--bw-success);
    font-weight: 600;
}

/* ========================================
   Date Picker Popup
   ======================================== */
.booking-widget__datepicker-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    animation: bw-fade-in 0.2s ease;
}

.booking-widget__datepicker-content {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--cal-bg, var(--bw-background));
    border: 1px solid var(--cal-border, var(--bw-border));
    border-radius: var(--cal-border-radius, var(--bw-radius));
    box-shadow: var(--bw-shadow-lg);
}

.booking-widget__datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--cal-header-bg, var(--cal-bg, var(--bw-background)));
    border-bottom: 1px solid var(--cal-border, var(--bw-border));
}

.booking-widget__datepicker-header h3 {
    margin: 0;
    font-family: var(--cal-heading-font, var(--cal-font-family, inherit));
    font-size: 18px;
    font-weight: 600;
    color: var(--cal-month-title-color, var(--bw-text));
}

.booking-widget__datepicker-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--cal-nav-bg, transparent);
    border: 1px solid var(--cal-nav-border, transparent);
    border-radius: 50%;
    cursor: pointer;
    color: var(--cal-nav-icon, var(--bw-text-muted));
    transition: background 0.2s, border-color 0.2s;
}

.booking-widget__datepicker-close:hover {
    background: var(--cal-nav-hover-bg, var(--bw-border));
    border-color: var(--cal-nav-hover-border, transparent);
    color: var(--cal-nav-icon, var(--bw-text));
}

.booking-widget__datepicker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--cal-bg, var(--bw-background));
}

.booking-widget__datepicker-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--cal-nav-bg, transparent);
    border: 1px solid var(--cal-nav-border, var(--bw-border));
    border-radius: 50%;
    cursor: pointer;
    color: var(--cal-nav-icon, var(--bw-text));
    transition: all 0.2s;
}

.booking-widget__datepicker-nav-btn:hover {
    background: var(--cal-nav-hover-bg, transparent);
    border-color: var(--cal-nav-hover-border, var(--bw-primary));
    color: var(--cal-nav-icon, var(--bw-primary));
}

.booking-widget__datepicker-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.booking-widget__datepicker-months-title {
    display: flex;
    gap: 48px;
    font-family: var(--cal-month-font, var(--cal-font-family, inherit));
    font-size: var(--cal-month-size, 16px);
    font-weight: var(--cal-month-weight, 600);
    color: var(--cal-month-title-color, var(--bw-text));
}

.booking-widget__datepicker-calendars {
    font-family: var(--cal-font-family, inherit);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cal-month-gap, 32px);
    padding: 0 24px 24px;
    background: var(--cal-bg, var(--bw-background));
}

.booking-widget__datepicker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--cal-bg, var(--bw-background));
    border-top: 1px solid var(--cal-border, var(--bw-border));
}

.booking-widget__datepicker-clear {
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--cal-clear-font, var(--cal-font-family, inherit));
    font-size: 14px;
    font-weight: 500;
    color: var(--cal-day-text, var(--bw-text));
    text-decoration: underline;
    transition: color 0.2s;
}

.booking-widget__datepicker-clear:hover {
    color: var(--cal-selected-bg, var(--bw-primary));
}

.booking-widget__datepicker-apply {
    padding: 12px 24px;
    background: var(--cal-selected-bg, var(--bw-primary));
    border: none;
    border-radius: var(--cal-day-radius, var(--bw-radius));
    cursor: pointer;
    font-family: var(--cal-btn-font, var(--cal-font-family, inherit));
    font-size: 14px;
    font-weight: 600;
    color: var(--cal-selected-text, #ffffff);
    transition: background 0.2s, opacity 0.2s;
}

.booking-widget__datepicker-apply:hover {
    opacity: 0.9;
}

/* ========================================
   Calendar Month - Uses Universal Calendar Settings
   ======================================== */
.booking-widget__calendar-month {
    min-width: 260px;
}

.booking-widget__calendar-title {
    text-align: center;
    font-family: var(--cal-month-font, var(--cal-font-family, inherit));
    font-size: var(--cal-month-size, 14px);
    font-weight: var(--cal-month-weight, 600);
    color: var(--cal-month-title-color, var(--bw-text));
    margin-bottom: 16px;
}

.booking-widget__calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.booking-widget__calendar-weekday {
    text-align: center;
    font-family: var(--cal-weekday-font, var(--cal-font-family, inherit));
    font-size: var(--cal-weekday-size, 11px);
    font-weight: var(--cal-weekday-weight, 600);
    text-transform: uppercase;
    color: var(--cal-weekday-color, var(--bw-text-muted));
    padding: 8px 0;
}

.booking-widget__calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--cal-day-gap, 0);
}

.booking-widget__calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--cal-day-font, var(--cal-font-family, inherit));
    font-size: var(--cal-font-size, 14px);
    font-weight: var(--cal-day-weight, 400);
    color: var(--cal-day-text, var(--bw-text));
    border-radius: var(--cal-day-radius, 0);
    transition: background 0.15s;
    position: relative;
}

.booking-widget__calendar-day:hover:not(:disabled) {
    background: var(--cal-hover-bg, var(--bw-border));
}

.booking-widget__calendar-day--empty {
    cursor: default;
}

.booking-widget__calendar-day--disabled {
    color: var(--cal-disabled-text, var(--bw-text-light));
    background: var(--cal-disabled-bg, transparent);
    cursor: not-allowed;
}

.booking-widget__calendar-day--blocked {
    color: var(--cal-disabled-text, var(--bw-text-light));
    text-decoration: line-through;
    cursor: not-allowed;
}

.booking-widget__calendar-day--selected {
    background: var(--cal-selected-bg, var(--bw-primary)) !important;
    color: var(--cal-selected-text, #ffffff) !important;
}

.booking-widget__calendar-day--in-range {
    background: var(--cal-range-bg, #f3f4f6);
}

.booking-widget__calendar-day--checkin {
    border-radius: 50% 0 0 50%;
}

.booking-widget__calendar-day--checkout {
    border-radius: 0 50% 50% 0;
}

.booking-widget__day-number {
    font-weight: 500;
}

.booking-widget__day-price {
    font-family: var(--cal-price-font, var(--cal-font-family, inherit));
    font-size: var(--cal-price-size, 9px);
    color: var(--cal-price-color, var(--bw-text-muted));
    margin-top: 2px;
}

.booking-widget__calendar-day--selected .booking-widget__day-price {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .booking-widget {
        position: static;
    }

    .booking-widget__card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .booking-widget__datepicker-calendars {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .booking-widget__datepicker-months-title {
        gap: 0;
    }

    .booking-widget__datepicker-months-title span:last-child {
        display: none;
    }

    .booking-widget__datepicker-content {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }

    .booking-widget__datepicker-popup {
        align-items: stretch;
    }
}

/* Mobile sticky footer bar (optional enhancement) */
@media (max-width: 1024px) {
    .booking-widget--mobile-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 1000;
        padding: 0;
    }

    .booking-widget--mobile-bar .booking-widget__card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .booking-widget--mobile-bar .booking-widget__price-header {
        margin-bottom: 0;
    }

    .booking-widget--mobile-bar .booking-widget__total-section,
    .booking-widget--mobile-bar .booking-widget__instant-book,
    .booking-widget--mobile-bar .booking-widget__dates,
    .booking-widget--mobile-bar .booking-widget__guests,
    .booking-widget--mobile-bar .booking-widget__loading,
    .booking-widget--mobile-bar .booking-widget__error,
    .booking-widget--mobile-bar .booking-widget__notice,
    .booking-widget--mobile-bar .booking-widget__discounts {
        display: none !important;
    }

    .booking-widget--mobile-bar .booking-widget__actions {
        margin-bottom: 0;
    }

    .booking-widget--mobile-bar .booking-widget__reserve-btn {
        padding: 12px 24px;
        white-space: nowrap;
    }
}

/* ========================================
   High z-index for dropdowns/popups
   ======================================== */
.booking-widget__guest-dropdown {
    z-index: 150;
}

.booking-widget__datepicker-popup {
    z-index: 9999;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .booking-widget {
        display: none;
    }
}

/* ========================================
   Widget Builder Admin Preview Overrides
   Ensures CSS variables cascade properly in admin preview
   ======================================== */
#cs-preview-container .booking-widget,
#cs-preview-container .cloudstay-booking-form {
    --bw-primary: var(--lp-booking-btn-bg, var(--bf-btn-bg, #222222));
    --bw-primary-text: var(--lp-booking-btn-text, var(--bf-btn-text, #ffffff));
    --bw-background: var(--lp-booking-bg, var(--bf-bg, #ffffff));
    --bw-label: var(--lp-booking-label, var(--bf-label, #4b5563));
    --bw-placeholder: var(--lp-booking-placeholder, var(--bf-placeholder, #9ca3af));
    --bw-border: var(--lp-booking-input-border, var(--bf-border, #e5e7eb));
    --bw-input-bg: var(--lp-booking-input-bg, var(--bf-input-bg, #ffffff));
    --bw-radius: var(--lp-booking-radius, var(--bf-radius, 0));
}

#cs-preview-container .booking-widget .booking-widget__card {
    background: var(--bw-background) !important;
    border-radius: var(--bw-radius) !important;
}

#cs-preview-container .booking-widget .booking-widget__reserve-btn {
    background: var(--bw-primary) !important;
    color: var(--bw-primary-text) !important;
}
