/* ============================================
   Booking Widget Panel - Airbnb-style
   ============================================ */

/* Desktop: sticky sidebar */
@media (min-width: 992px) {
    .booking-widget-panel {
        position: sticky;
        top: 100px;
        z-index: 100;
        max-width: 400px;
    }
}

/* Date selector trigger */
.bw-date-selector {
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.bw-date-selector:hover {
    border-color: #0b0a12 !important;
}
.bw-date-selector .text-uppercase {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

/* Anchor element for Flatpickr input */
.bw-date-anchor {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    visibility: hidden;
}

/* Ensure Flatpickr calendar appears above offcanvas and modals */
.flatpickr-calendar {
    z-index: 99999 !important;
}

/* Active date field highlight */
.bw-date-field {
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    overflow: visible;
}
#bw-checkin-trigger {
    border-radius: 0.375rem 0 0 0.375rem;
}
#bw-checkout-trigger {
    border-radius: 0 0.375rem 0.375rem 0;
}
.bw-date-field:hover {
    box-shadow: inset 0 0 0 100px rgba(0,0,0,0.03);
}
.bw-date-field.active {
    box-shadow: inset 0 0 0 100px rgba(0,0,0,0.05);
}




/* Flatpickr day pricing */
.bw-day-price {
    display: block;
    font-size: 0.5rem;
    line-height: 1;
    color: #6c757d;
    margin-top: 1px;
}

/* Flatpickr unavailable styling */
.flatpickr-day.bw-unavailable {
    text-decoration: line-through;
    opacity: 0.4;
}

/* Price display */
.bw-placeholder-text {
    font-size: 1rem;
    font-weight: 400;
    color: #6c757d;
}
.bw-per-night {
    font-size: 0.9rem;
}

/* Pricing breakdown lines */
.bw-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
}
.bw-price-line .bw-label {
    color: #0b0a12;
}
.bw-price-line .bw-label-detail {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: help;
}
.bw-price-line .bw-value {
    color: #0b0a12;
}
.bw-price-line.bw-discount .bw-value {
    color: #0cbc87;
}

/* Rate plan radio options */
.bw-rate-plan-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.bw-rate-plan-option:hover {
    border-color: #5143d9;
}
.bw-rate-plan-option.selected {
    border-color: #5143d9;
    background-color: rgba(81, 67, 217, 0.04);
}
.bw-rate-plan-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #5143d9;
}
.bw-rate-plan-option .bw-plan-name {
    flex: 1;
    font-weight: 500;
}
.bw-rate-plan-option .bw-plan-price {
    font-weight: 600;
}
.bw-rate-plan-option .bw-plan-reduced {
    font-size: 0.75rem;
    color: #0cbc87;
    margin-left: 6px;
}

/* Loading overlay */
.bw-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* CTA button states */
#bw-cta-btn {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 0.5rem;
    letter-spacing: 0.3px;
}
#bw-cta-btn:disabled {
    opacity: 0.65;
}
#bw-cta-btn.btn-danger {
    pointer-events: none;
}

/* Currency toggle */
#bw-currency-toggle .btn {
    padding: 3px 10px;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}
#bw-currency-toggle .btn.active {
    background-color: #5143d9;
    border-color: #5143d9;
    color: #fff;
}

/* ============================================
   Mobile Bottom Bar
   ============================================ */
.bw-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #fff;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

/* Hide mobile bar on desktop */
@media (min-width: 992px) {
    .bw-mobile-bar {
        display: none !important;
    }
}

/* Hide desktop widget on mobile (content is in offcanvas instead) */
@media (max-width: 991.98px) {
    #booking-widget {
        display: none;
    }
    /* Add bottom padding to body so content isn't hidden behind the mobile bar */
    body {
        padding-bottom: 80px;
    }
}

/* Offcanvas adjustments */
#bw-offcanvas {
    z-index: 9999;
}
.offcanvas-backdrop.show + #bw-offcanvas,
body > .offcanvas-backdrop {
    z-index: 9998;
}
#bw-offcanvas .offcanvas-body {
    padding: 1rem;
}
#bw-offcanvas .booking-widget-panel {
    position: static !important;
    max-width: none !important;
    box-shadow: none !important;
    border: none !important;
}
#bw-offcanvas .bw-mobile-bar {
    display: none !important;
}

/* Trust signals */
#bw-trust small {
    font-size: 0.8rem;
}

/* Coupon applied badge */
.bw-coupon-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(12, 188, 135, 0.1);
    color: #0cbc87;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}
.bw-coupon-badge .bw-coupon-remove {
    margin-left: 6px;
    cursor: pointer;
    opacity: 0.7;
}
.bw-coupon-badge .bw-coupon-remove:hover {
    opacity: 1;
}
