/**
 * Mobile Sticky Booking Bar Styles
 * Version 14.1.4
 * 
 * Changelog:
 * - 14.1.4: Added inline CSS to functions.php to match archive-modal exactly
 * - 14.1.3: Updated mobile-sticky-modal structure to match archive-modal exactly (header, actions, body, responsive)
 * - 14.1.2: Updated mobile-sticky-modal width to match archive-modal (max-width: 390px, width: 90%)
 */

/* Mobile Sticky Booking Bar Container */
.mobile-sticky-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    padding: env(safe-area-inset-bottom, 0) 0 0 0;
    /* iOS safe area for home indicator */
    padding-bottom: max(env(safe-area-inset-bottom, 0), 10px);
}

/* Desktop/Tablet Full Width Bar */
@media (min-width: 769px) {
    .mobile-sticky-booking-bar {
        width: 80%;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
        padding: 16px 20px;
    }
    
    .mobile-bar-content {
        padding: 0;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .mobile-bar-price {
        padding-right: 20px;
    }
    
    .mobile-bar-price-label {
        font-size: 14px;
    }
    
    .mobile-bar-price-value {
        font-size: 22px;
    }
    
    .mobile-bar-action {
        padding-left: 0;
    }
    
    .mobile-bar-book-btn {
        padding: 14px 32px;
        font-size: 16px;
    }
}

/* Mobile Bar Content Layout */
.mobile-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 100%;
    margin: 0 auto;
}

/* Mobile Bar Price Section */
.mobile-bar-price {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
}

.mobile-bar-price-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
}

.mobile-bar-price-value {
    font-size: 18px;
    color: #333;
    font-weight: 700;
    line-height: 1.2;
}

/* Mobile Bar Action Section */
.mobile-bar-action {
    flex-shrink: 0;
}

/* Mobile Bar Book Now Button */
.mobile-bar-book-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--btn-bg-color, #0073aa);
    color: var(--btn-text-color, #ffffff);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.4;
}

.mobile-bar-book-btn:hover {
    background: var(--btn-hover-color, #005a87);
}

.mobile-bar-book-btn:active {
    transform: scale(0.98);
}

/* Mobile Sticky Modal Overlay */
.mobile-sticky-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: max(env(safe-area-inset-bottom, 0), 20px);
}

.mobile-sticky-overlay[style*="display: flex"] {
    display: flex !important;
}

/* Mobile Sticky Modal */
.mobile-sticky-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 390px;
    width: 90%;
    height: 856.2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Mobile Sticky Modal Header */
.mobile-sticky-modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sticky-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-sticky-modal-btn-details {
    padding: 8px 16px !important;
    background: #0073aa !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
    border: none !important;
    cursor: pointer !important;
}

.mobile-sticky-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0d1b2a;
    line-height: 1.3;
    flex: 1;
    padding-right: 12px;
}

.mobile-sticky-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 2px;
    font-weight: 300;
    flex-shrink: 0;
}

.mobile-sticky-modal-close:hover {
    color: #000;
}

/* Mobile Sticky Modal Body */
.mobile-sticky-modal-body {
    padding: 20px;
    min-height: 400px;
}

/* Mobile Sticky Loading Indicator */
.mobile-sticky-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Mobile Only Display - Hide on Desktop/Tablet when disabled */
@media (min-width: 769px) {
    .mobile-sticky-booking-bar.desktop-sticky-disabled {
        display: none !important;
    }
    
    .mobile-sticky-overlay.desktop-sticky-disabled {
        display: none !important;
    }
}

/* Responsive Adjustments for Small Mobile Screens */
@media (max-width: 600px) {
    .mobile-sticky-modal {
        width: 95%;
        height: 90vh;
    }
    .mobile-sticky-modal-body {
        padding: 15px;
        min-height: 300px;
    }
}

@media (max-width: 375px) {
    .mobile-bar-content {
        padding: 10px 12px;
    }
    
    .mobile-bar-price-label {
        font-size: 11px;
    }
    
    .mobile-bar-price-value {
        font-size: 16px;
    }
    
    .mobile-bar-book-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .mobile-sticky-modal {
        max-height: 85vh;
    }
    
    .mobile-sticky-modal-header {
        padding: 12px 16px;
    }
    
    .mobile-sticky-modal-title {
        font-size: 16px;
    }
    
    .mobile-sticky-modal-body {
        padding: 16px;
    }
    .mobile-sticky-booking-bar {
    width: 80vw !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    }
}

@media (max-width: 768px) {
    .mobile-sticky-booking-bar {
        width: 80% !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        border-radius: 12px 12px 0 0;
    }
}

/* Prevent Body Scroll When Modal is Open */
body.mobile-sticky-modal-open {
    overflow: hidden;
}

/* Ensure bar doesn't overlap with existing fixed elements */
.mobile-sticky-booking-bar ~ .site-footer {
    padding-bottom: 0;
}
