/* ================================================================
   hotel-list.css — booking/hotel-list.php
   Extracted from an inline <style> block so the browser caches this
   once instead of re-downloading it on every page load.
   ================================================================ */

:root { --navy:#0F243D; --navy2:#1a3a5c; --gold:#B59455; --gold2:#9a6f2f; --goldl:#d4b47a; --light:#F5F6F8; }

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Tajawal', 'Cairo', sans-serif; background: var(--light); direction: rtl; }

/* ── HERO SEARCH ── */
.search-hero {
    background: linear-gradient(135deg, var(--navy), var(--navy2));
    padding: 36px 0 64px; position: relative;
    /* overflow: hidden removed — was clipping the guest dropdown */
}
.search-hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('../assets/images/qaaba.png') center/cover no-repeat;
    opacity: .05;
}
.search-hero::after {
    content: ''; position: absolute; bottom: -1px;
    left: 0; right: 0; height: 52px;
    background: var(--light);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.search-hero-title {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 800; color: #fff;
    margin-bottom: 6px; position: relative; z-index: 2;
}
.search-hero-sub {
    font-size: .9rem; color: rgba(255,255,255,.6);
    margin-bottom: 28px; position: relative; z-index: 2;
}

/* ── Search card ── */
.search-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    padding: 22px 24px;
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr 1fr auto;
    gap: 12px; align-items: end;
}
.sc-field label {
    display: block; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--gold); margin-bottom: 6px;
}
.sc-input {
    width: 100%; height: 44px; border: 1.5px solid #e2e8f0;
    border-radius: 10px; padding: 0 14px;
    font-size: .9rem; font-family: inherit;
    color: var(--navy); background: var(--light);
    outline: none; transition: border-color .2s, box-shadow .2s;
    cursor: pointer;
    -webkit-appearance: none; appearance: none;
}
.sc-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(181,148,85,.15);
    background: #fff;
}
.sc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B59455' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 12px center; padding-left: 32px;
}
.sc-btn {
    height: 44px; background: linear-gradient(135deg, var(--gold), var(--gold2));
    border: none; border-radius: 10px; color: #fff;
    font-size: .9rem; font-weight: 700; padding: 0 22px;
    cursor: pointer; transition: all .2s;
    white-space: nowrap; font-family: inherit;
    display: flex; align-items: center; gap: 7px;
    box-shadow: 0 4px 12px rgba(181,148,85,.35);
}
.sc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(181,148,85,.5); }

/* Guests dropdown */
.guest-dropdown-wrap { position: relative; }
.guest-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border: 1.5px solid #e2e8f0;
    padding: 12px; min-width: 240px; z-index: 9999;
    display: none;
}
.guest-dropdown.open { display: block; }
.guest-row {
    display: flex; justify-content: space-between;
    align-items: center; padding: 10px 4px;
    border-bottom: 1px solid #f5f6f8;
}
.guest-row:last-child { border-bottom: none; }
.guest-row-label { font-size: .88rem; font-weight: 700; color: var(--navy); }
.guest-row-sub   { font-size: .72rem; color: #9ca3af; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1.5px solid #e2e8f0; background: #fff;
    color: var(--navy); font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-weight: 700; transition: all .15s;
}
.qty-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.qty-val { font-size: .95rem; font-weight: 800; color: var(--navy); min-width: 20px; text-align: center; }

/* ── Results section ── */
.results-wrap { margin-top: -8px; padding: 24px 0 48px; }

/* ── Result meta bar ── */
.results-meta {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap;
    gap: 10px; margin-bottom: 18px;
}
.results-count {
    font-size: .88rem; color: #6c757d; font-weight: 600;
}
.results-count strong { color: var(--navy); }

/* ── Hotel card ── */
.hotel-card {
    background: #fff; border-radius: 14px;
    border: 1.5px solid #e8edf3;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden; margin-bottom: 14px;
    transition: all .2s;
}
.hotel-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
    transform: translateY(-2px);
    border-color: rgba(181,148,85,.3);
}
.hotel-card-inner { display: flex; gap: 0; }
.hotel-thumb {
    width: 220px; flex-shrink: 0;
    position: relative; overflow: hidden; cursor: pointer;
}
.hotel-thumb img {
    width: 100%; height: 100%; min-height: 185px;
    object-fit: cover; display: block;
    transition: transform .4s;
}
.hotel-card:hover .hotel-thumb img { transform: scale(1.05); }
.hotel-badge {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(15,36,61,.88); color: var(--goldl);
    font-size: .68rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    border: 1px solid rgba(181,148,85,.3);
    display: flex; align-items: center; gap: 4px;
}
.hotel-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.hotel-name { font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.hotel-location {
    font-size: .8rem; color: #9ca3af; margin-bottom: 6px;
    display: flex; align-items: center; gap: 4px;
}
.hotel-distance {
    font-size: .8rem; color: #9ca3af;
    display: flex; align-items: center; gap: 4px; margin-bottom: 8px;
}
.hotel-stars { display: flex; gap: 2px; margin-bottom: 10px; }
.hotel-stars i { font-size: .85rem; color: var(--gold); }
.hotel-stars i.empty { color: #dee2e6; }
.hotel-amenities { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: auto; }
.amenity-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--light); border-radius: 20px;
    padding: 3px 10px; font-size: .72rem; font-weight: 600; color: #374151;
}
.amenity-chip i { color: #198754; font-size: .72rem; }
.hotel-footer {
    display: flex; align-items: flex-end;
    justify-content: space-between; margin-top: 14px;
    padding-top: 12px; border-top: 1px solid #f5f6f8;
    flex-wrap: wrap; gap: 10px;
}
.hotel-price-from { font-size: .7rem; color: #9ca3af; margin-bottom: 2px; }
.hotel-price-amt  { font-size: 1.25rem; font-weight: 800; color: var(--navy); line-height: 1; }
.hotel-price-sub  { font-size: .72rem; color: #9ca3af; margin-top: 2px; }
.btn-book {
    background: linear-gradient(135deg, var(--navy), var(--navy2));
    color: #fff; border: none; border-radius: 10px;
    padding: 9px 22px; font-size: .88rem; font-weight: 700;
    text-decoration: none; display: inline-flex;
    align-items: center; gap: 7px;
    transition: all .15s; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15,36,61,.2);
}
.btn-book:hover { opacity: .9; color: #fff; transform: translateY(-1px); }

/* ── States ── */
.empty-state {
    text-align: center; padding: 60px 24px;
    background: #fff; border-radius: 14px;
    border: 1.5px dashed #e2e8f0;
}
.empty-state i { font-size: 3rem; color: #dee2e6; display: block; margin-bottom: 14px; }
.empty-state h5 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.empty-state p  { font-size: .88rem; color: #9ca3af; margin: 0; }

.loading-state {
    text-align: center; padding: 48px;
    display: none;
}
.loading-state .spinner-border { color: var(--gold); width: 2.5rem; height: 2.5rem; }

/* ── Image modal ── */
.image-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.88); z-index: 9999;
    align-items: center; justify-content: center;
}
.image-modal img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.image-modal .close-btn {
    position: absolute; top: 20px; left: 24px;
    color: #fff; font-size: 2rem; cursor: pointer;
    background: rgba(255,255,255,.12); width: 42px; height: 42px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; line-height: 1;
    transition: background .15s;
}
.image-modal .close-btn:hover { background: rgba(255,255,255,.25); }

/* ── Responsive ── */
@media(max-width:992px) {
    .search-card {
        grid-template-columns: 1fr 1fr;
    }
    .sc-btn { width: 100%; justify-content: center; }
}
@media(max-width:600px) {
    .search-card { grid-template-columns: 1fr; }
    .hotel-card-inner { flex-direction: column; }
    .hotel-thumb { width: 100%; }
    .hotel-thumb img { min-height: 180px; }
}

/* flatpickr gold theme override */
.flatpickr-calendar { font-family: 'Tajawal', sans-serif !important; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--navy) !important; border-color: var(--navy) !important;
}
.flatpickr-day.inRange {
    background: rgba(181,148,85,.15) !important; border-color: transparent !important;
    box-shadow: none !important;
}
.flatpickr-day:hover { background: var(--goldl) !important; border-color: var(--goldl) !important; }
