/**
 * Booking Form Enhancements CSS
 * - Live price calculator styling
 * - Mobile responsive booking form
 * - Sticky booking form on desktop
 * - Package selection highlights
 */

/* ============================================
   LIVE PRICE CALCULATOR
   ============================================ */

.live-price-calculator {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.live-price-calculator.active {
    opacity: 1;
    max-height: 500px;
    margin: 20px 0;
}

.price-calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #10b981;
}

.price-calculator-header h5 {
    color: #065f46;
    display: flex;
    align-items: center;
}

.price-calculator-header i {
    color: #10b981;
}

.price-calculator-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-breakdown {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.breakdown-amount {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.total-label {
    font-size: 16px;
    color: #065f46;
    font-weight: 600;
}

.total-amount {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.total-amount .currency {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
}

.total-amount .amount {
    font-size: 24px;
    color: #065f46;
    font-weight: 700;
}

/* ============================================
   STICKY BOOKING FORM (DESKTOP)
   ============================================ */

@media (min-width: 769px) {
    .bravo_single_book_wrap {
        position: sticky;
        top: 120px;
        z-index: 50;
    }
    
    .bravo_single_book_wrap.is-pinned {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   MOBILE BOOKING FORM COLLAPSE/EXPAND
   ============================================ */

@media (max-width: 768px) {
    /* Mobile Toggle Button */
    .mobile-booking-toggle {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #ffffff;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
        padding: 12px 15px;
        display: none;
    }
    
    .mobile-booking-toggle .toggle-btn {
        width: 100%;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        border: none;
        border-radius: 12px;
        padding: 15px 20px;
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-booking-toggle .toggle-btn:active {
        transform: scale(0.98);
    }
    
    /* Collapsed State */
    .bravo_single_book_wrap.mobile-collapsed {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        z-index: 99;
        transition: bottom 0.4s ease;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .bravo_single_book_wrap.mobile-collapsed ~ .mobile-booking-toggle {
        display: block;
    }
    
    /* Expanded State */
    .bravo_single_book_wrap.show-booking-form {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.4s ease;
    }
    
    .bravo_single_book_wrap.show-booking-form .bravo_single_book {
        border-radius: 20px 20px 0 0;
    }
    
    .bravo_single_book_wrap.show-booking-form ~ .mobile-booking-toggle {
        display: none;
    }
    
    @keyframes slideUp {
        from {
            bottom: -100%;
        }
        to {
            bottom: 0;
        }
    }
    
    /* Mobile Price Calculator Adjustments */
    .live-price-calculator {
        padding: 15px;
    }
    
    .price-total {
        padding: 12px;
    }
    
    .total-amount .amount {
        font-size: 20px;
    }
    
    /* Mobile Pricing Section Spacing */
    .enhanced-pricing-section {
        margin-bottom: 80px; /* Space for toggle button */
    }
}

/* ============================================
   PACKAGE SELECTION HIGHLIGHTS
   ============================================ */

.enhanced-pricing-section .panel.package-selected {
    border: 2px solid #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    animation: pulseGreen 0.6s ease;
}

@keyframes pulseGreen {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
    }
}

.enhanced-pricing-section .panel.package-selected .setting-title {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 20px 20px 0 0;
}

.enhanced-pricing-section .panel.package-selected .setting-title h3 {
    color: #065f46;
}

.enhanced-pricing-section .panel.package-selected .setting-title i:first-child {
    color: #10b981;
}

/* Select Package Button States */
.select-package-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.select-package-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.select-package-btn:active {
    transform: translateY(0);
}

.panel.package-selected .select-package-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.panel.package-selected .select-package-btn:before {
    content: "✓ ";
    margin-right: 5px;
}

.panel.package-selected .select-package-btn .icon-arrow-top-right {
    display: none;
}

/* ============================================
   MOBILE RESPONSIVE PRICING CARDS
   ============================================ */

@media (max-width: 768px) {
    /* Pricing Cards */
    .pricing-card {
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
        transition: all 0.3s ease;
    }
    
    .pricing-card:hover {
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }
    
    .pricing-card-header {
        background: #f9fafb;
        padding: 15px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .pricing-card-header h6 {
        margin-bottom: 5px;
        color: #1f2937;
    }
    
    .pricing-card-body {
        padding: 15px;
    }
    
    .pricing-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .pricing-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .pricing-row-best {
        background: #f0fdf4;
        margin: 0 -15px;
        padding: 12px 15px;
        border-bottom: none;
    }
    
    .pricing-label {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .pricing-value {
        font-size: 16px;
        color: #1f2937;
        font-weight: 600;
        text-align: right;
    }
    
    .pricing-value.text-success {
        color: #10b981;
    }
    
    .badge-best {
        background: #10b981;
        color: white;
        padding: 2px 8px;
        border-radius: 8px;
        font-size: 11px;
        margin-left: 5px;
        font-weight: 600;
    }
    
    /* Gap utility for mobile */
    .gap-10 {
        gap: 10px;
    }
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   LOADING STATES
   ============================================ */

.live-price-calculator.loading {
    opacity: 0.6;
    pointer-events: none;
}

.live-price-calculator.loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #10b981;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.select-package-btn:focus,
.toggle-btn:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .mobile-booking-toggle,
    .live-price-calculator,
    .select-package-btn {
        display: none !important;
    }
}
