/* Aurora Hotel Plaza - UI Fixes & Contrast Improvements */

/* 1. Header & Liquid Overlay Improvements */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, backdrop-filter 0.3s ease;
    will-change: transform;
    /* Lớp phủ mờ nhẹ phía trên để bảo vệ chữ trắng */
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
}

/* Tăng độ tương phản đặc biệt cho các trang glass-page (Chi tiết căn hộ) */
.glass-page #main-header.header-transparent {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Thu gọn chiều cao header (kéo lên trên) */
#main-header .container {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    min-height: 70px; /* Giảm chiều cao xuống mức thanh thoát */
}

@media (max-width: 768px) {
    #main-header .container {
        padding-top: 1rem !important;
        padding-bottom: 0.5rem !important;
    }
}

#main-header.header-transparent {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#main-header.header-scrolled {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

/* GIẢI PHÁP: Giúp chữ trắng đọc được trên nền trắng - Khôi phục Style Bold gốc */
#main-header .nav-link, 
#main-header .btn-login,
#main-header .material-symbols-outlined,
#main-header span,
#main-header a {
    font-weight: 600 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.3s ease;
}

/* Đảm bảo Menu xổ xuống (Submenu, Lang, User) đồng màu và trong suốt nhẹ */
.submenu, .user-menu, .lang-menu {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.submenu-item, .user-menu-item, .lang-option, .user-menu-header div {
    color: #ffffff !important;
    text-shadow: none !important;
}

.submenu-item:hover, .user-menu-item:hover, .lang-option:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    color: #d4af37 !important;
}

/* Hover riêng lẻ từng mục như bình thường */
#main-header .nav-link:hover {
    color: #d4af37 !important;
    text-shadow: none !important;
}

/* Ẩn hoàn toàn các border bottom nếu có */
#main-header, #main-header.header-scrolled {
    border-bottom: none !important;
}

/* Smart Header States */
#main-header.header-hidden {
    transform: translateY(-105%);
    pointer-events: none;
}

#main-header.header-visible {
    transform: translateY(0);
}

/* GIẢI PHÁP: Đẩy Hero xuống nhẹ để không bị đè quá nhiều bởi Header/Booking Bar */
main.flex.h-full.grow.flex-col {
    padding-top: 40px !important; /* Giảm xuống còn 40px để cân đối */
}

@media (max-width: 768px) {
    main.flex.h-full.grow.flex-col {
        padding-top: 30px !important; /* Mobile giảm xuống 30px */
    }
}

/* Khôi phục Hero/Body như cũ */
body {
    display: block;
}

.hero-slider, .page-hero {
    margin-top: 0;
}

/* 2. REFINED QUICK BOOKING FORM (Hero Slider) */
.glass-booking-form {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
}

.glass-input-solid {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: white !important;
    padding: 0 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.glass-input-solid:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15) !important;
    outline: none !important;
}

.glass-select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* Fix Mobile Layout & Input Cutting */
@media (max-width: 768px) {
    .glass-booking-form {
        padding: 20px !important;
        margin: 0 10px !important;
        border-radius: 20px !important;
    }

    .glass-booking-form form {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Chia 2 cột cho ngày */
        gap: 12px !important;
    }

    /* Các ô chọn người và nút tìm kiếm chiếm 100% chiều rộng */
    .glass-booking-form .flex-col:nth-child(n+3),
    .glass-booking-form button {
        grid-column: span 2 !important;
    }

    .glass-input-solid {
        height: 50px !important;
        font-size: 14px !important;
    }
}

/* 3. Fix "Xem tất cả phòng/căn hộ" contrast */
.btn-view-all {
    color: #ffffff !important;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* 3. Mobile Slider Fix (< > Buttons) */
.slider-arrow {
    pointer-events: auto !important;
    z-index: 40 !important;
}

.slider-arrow .arrow-icon {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-size: 40px !important;
}

/* 4. Mobile Menu - Remove Clickable Full Width Override */
/* (Deleted) */

/* 5. Fix "Giường phụ" & Quantity Selectors in Booking */
.extra-guest-entry {
    background: rgba(30, 41, 59, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    transition: all 0.3s ease !important;
}

.extra-guest-entry:hover {
    border-color: rgba(212, 175, 55, 0.3) !important;
    background: rgba(30, 41, 59, 0.6) !important;
}

.height-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-width: 1px !important;
}

.height-btn.active {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: #d4af37 !important;
    color: #d4af37 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1) !important;
}

.booking-extra-bed-card, 
.booking-form-card,
#extra_bed_section,
#extra_guests_section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Trau chuốt bộ tăng giảm số lượng (Quantity Selectors) */
.form-group .flex.items-center.gap-2 {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
}

/* Nút + - nhỏ gọn và sang trọng hơn */
.form-group button[onclick*="adjustValue"],
#extra_bed_section button[onclick*="adjustValue"] {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #d4af37 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.form-group button[onclick*="adjustValue"]:hover,
#extra_bed_section button[onclick*="adjustValue"]:hover {
    background: rgba(212, 175, 55, 0.25) !important;
    transform: scale(1.05);
}

.form-group button[onclick*="adjustValue"] .material-symbols-outlined,
#extra_bed_section button[onclick*="adjustValue"] .material-symbols-outlined {
    font-size: 18px !important;
}

/* Ô nhập số lượng mỏng nhẹ */
.form-group input[readonly],
#extra_bed_section input[readonly] {
    background: transparent !important;
    border: none !important;
    width: 36px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    padding: 0 !important;
    text-align: center !important;
}

@media (max-width: 640px) {
    #extra_bed_section .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    #extra_bed_section .flex.items-center.gap-3:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .booking-step-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* 6. Form Search Rooms - Dropdown Visibility */
select.glass-input-solid option {
    background-color: #1f2937 !important; /* Dark background for options */
    color: #ffffff !important;
}

/* 7. Registration Checkbox Fix */
input[type="checkbox"] {
    accent-color: #d4af37;
    transform: scale(1.1);
    vertical-align: middle;
}

/* 8. Fix QR Back Button */
.btn-back-qr {
    z-index: 60 !important; /* Above header */
    position: relative;
}

/* 9. Map Tỷ lệ 3x4 on Mobile */
.map-container-mobile {
    aspect-ratio: 3 / 4 !important;
}
