/* ══════════════════════════════════════
   HotelBook Pro — Frontend CSS
   Author: Bassam Elsawy | bassamelsawy.com
══════════════════════════════════════ */
:root {
  --hb-gold:    #b8924a;
  --hb-gold-lt: #d4ac6e;
  --hb-dark:    #1a1a2e;
  --hb-text:    #333;
  --hb-muted:   #666;
  --hb-border:  #e5e7eb;
  --hb-bg:      #f9fafb;
  --hb-white:   #ffffff;
  --hb-radius:  10px;
  --hb-shadow:  0 4px 24px rgba(0,0,0,0.08);
  --hb-trans:   0.2s ease;
}

/* ── SEARCH ── */
.hb-search-wrap { background: var(--hb-dark); padding: 32px; border-radius: var(--hb-radius); }
.hb-search-form { width: 100%; }
.hb-search-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.hb-field-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.hb-field-group label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; }
.hb-field-small { max-width: 100px; }
.hb-input {
  padding: 10px 14px; border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 6px; font-size: 14px; background: rgba(255,255,255,0.08);
  color: #fff; transition: border-color var(--hb-trans);
  font-family: inherit; width: 100%;
}
.hb-input:focus { outline: none; border-color: var(--hb-gold); background: rgba(255,255,255,0.12); }
.hb-input option { background: var(--hb-dark); color: #fff; }
.hb-btn-search {
  background: var(--hb-gold); color: #fff;
  border: none; border-radius: 6px; padding: 11px 24px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background var(--hb-trans), transform var(--hb-trans);
  white-space: nowrap; font-family: inherit;
}
.hb-btn-search:hover { background: var(--hb-gold-lt); transform: translateY(-1px); }

/* ── RESULTS LAYOUT ── */
.hb-results-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 28px; margin-top: 28px; }
@media(max-width:768px) { .hb-results-wrap { grid-template-columns: 1fr; } }

/* ── FILTERS SIDEBAR ── */
.hb-filters-sidebar {
  background: var(--hb-white); border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius); padding: 20px; height: fit-content;
  position: sticky; top: 80px;
}
.hb-filters-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--hb-dark); }
.hb-filter-group { margin-bottom: 20px; }
.hb-filter-group label { display: block; font-size: 13px; font-weight: 500; color: var(--hb-muted); margin-bottom: 8px; }
.hb-price-range { display: flex; align-items: center; gap: 8px; }
.hb-price-range .hb-input { background: var(--hb-bg); color: var(--hb-text); border-color: var(--hb-border); }
.hb-price-range .hb-input:focus { border-color: var(--hb-gold); }
.hb-price-range span { color: var(--hb-muted); }
.hb-stars-filter, .hb-amenities-filter { display: flex; flex-direction: column; gap: 6px; }
.hb-star-label, .hb-amenity-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer; padding: 4px 0;
  color: var(--hb-text);
}
.hb-star-label input, .hb-amenity-label input { accent-color: var(--hb-gold); }

/* ── BUTTONS ── */
.hb-btn-primary {
  background: var(--hb-gold); color: #fff;
  border: none; border-radius: 6px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: background var(--hb-trans), transform var(--hb-trans);
  font-family: inherit; text-align: center;
}
.hb-btn-primary:hover { background: var(--hb-gold-lt); transform: translateY(-1px); color: #fff; }
.hb-btn-ghost {
  background: transparent; color: var(--hb-muted);
  border: 1.5px solid var(--hb-border); border-radius: 6px;
  padding: 9px 20px; font-size: 14px; cursor: pointer;
  font-family: inherit;
}
.hb-btn-ghost:hover { border-color: var(--hb-gold); color: var(--hb-gold); }

/* ── RESULTS ── */
.hb-results-header { margin-bottom: 16px; font-size: 14px; color: var(--hb-muted); }
.hb-rooms-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 20px; }

/* ── ROOM CARD ── */
.hb-room-card {
  background: var(--hb-white); border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius); overflow: hidden;
  transition: transform var(--hb-trans), box-shadow var(--hb-trans);
}
.hb-room-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.hb-room-gallery-wrap { position: relative; }
.hb-room-img {
  height: 200px; background-size: cover; background-position: center;
  background-color: #e5e7eb; position: relative;
}
.hb-room-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--hb-gold); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 4px;
}
.hb-seasonal-badge {
  position: absolute; top: 12px; left: 12px;
  background: #10b981; color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 4px;
}
.hb-room-body { padding: 18px; }
.hb-room-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.hb-room-name { font-size: 17px; font-weight: 600; color: var(--hb-dark); line-height: 1.3; }
.hb-room-stars { color: var(--hb-gold); font-size: 13px; white-space: nowrap; }
.hb-room-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--hb-muted); margin-bottom: 10px; }
.hb-room-amenities { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.hb-amenity-tag { background: #f3f4f6; color: var(--hb-muted); font-size: 11px; padding: 3px 8px; border-radius: 4px; }
.hb-room-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--hb-border); }
.hb-price-night { font-size: 20px; font-weight: 700; color: var(--hb-dark); }
.hb-price-night small { font-size: 13px; font-weight: 400; color: var(--hb-muted); }
.hb-price-total { font-size: 12px; color: var(--hb-muted); }
.hb-price-tax { font-size: 11px; color: #9ca3af; }
.hb-btn-book { padding: 10px 18px; font-size: 14px; }

/* ── LOADING / EMPTY ── */
.hb-loading { text-align: center; padding: 60px 20px; color: var(--hb-muted); }
.hb-spinner {
  width: 36px; height: 36px; border: 3px solid var(--hb-border);
  border-top-color: var(--hb-gold); border-radius: 50%;
  animation: hb-spin 0.8s linear infinite; margin: 0 auto 14px;
}
@keyframes hb-spin { to { transform: rotate(360deg); } }
.hb-no-results { text-align: center; padding: 60px 20px; }
.hb-no-results-icon { font-size: 52px; margin-bottom: 12px; }
.hb-no-results h3 { font-size: 20px; margin-bottom: 8px; color: var(--hb-dark); }
.hb-no-results p { color: var(--hb-muted); }

/* ── CHECKOUT ── */
.hb-checkout-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.hb-checkout-title { font-size: 26px; font-weight: 600; color: var(--hb-dark); margin-bottom: 24px; }
.hb-checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 36px; }
@media(max-width:900px) { .hb-checkout-grid { grid-template-columns: 1fr; } }

.hb-lock-timer {
  background: #fef3c7; border: 1px solid #f59e0b;
  border-radius: 6px; padding: 12px 18px; margin-bottom: 24px;
  font-size: 14px; color: #92400e;
}

.hb-form-section-title { font-size: 15px; font-weight: 600; color: var(--hb-dark); margin: 20px 0 12px; }
.hb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px) { .hb-form-row { grid-template-columns: 1fr; } }
.hb-checkout-form-col .hb-field-group { margin-bottom: 16px; }
.hb-checkout-form-col .hb-field-group label { color: var(--hb-text); font-size: 13px; font-weight: 500; }
.hb-checkout-form-col .hb-input { background: #fff; color: var(--hb-text); border-color: var(--hb-border); }
.hb-checkout-form-col .hb-input:focus { border-color: var(--hb-gold); }
textarea.hb-input { resize: vertical; width: 100%; }

.hb-payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.hb-payment-option {
  border: 2px solid var(--hb-border); border-radius: 8px; padding: 14px;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  transition: border-color var(--hb-trans), background var(--hb-trans);
}
.hb-payment-option.active { border-color: var(--hb-gold); background: #fef9f0; }
.hb-payment-option input { display: none; }
.hb-payment-icon { font-size: 24px; }
.hb-payment-option strong { display: block; font-size: 14px; color: var(--hb-dark); }
.hb-payment-option small { font-size: 12px; color: var(--hb-muted); }

.hb-btn-submit {
  width: 100%; background: var(--hb-gold); color: #fff;
  border: none; border-radius: 8px; padding: 15px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  margin-top: 12px; font-family: inherit;
  transition: background var(--hb-trans);
}
.hb-btn-submit:hover { background: var(--hb-gold-lt); }
.hb-btn-submit:disabled { background: #9ca3af; cursor: not-allowed; }

/* ── SUMMARY CARD ── */
.hb-summary-card {
  background: var(--hb-white); border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius); overflow: hidden;
  box-shadow: var(--hb-shadow); position: sticky; top: 80px;
}
.hb-summary-img { height: 180px; background-size: cover; background-position: center; background-color: #e5e7eb; }
.hb-summary-body { padding: 20px; }
.hb-summary-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--hb-dark); }
.hb-summary-dates, .hb-summary-guests { font-size: 13px; color: var(--hb-muted); margin-bottom: 6px; }
.hb-summary-divider { height: 1px; background: var(--hb-border); margin: 14px 0; }
.hb-summary-price-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--hb-muted); margin-bottom: 6px; }
.hb-summary-total-row { display: flex; justify-content: space-between; font-size: 18px; color: var(--hb-dark); }
.hb-summary-seasonal { font-size: 12px; color: #10b981; margin-top: 10px; }
.hb-checkout-note { font-size: 12px; color: var(--hb-muted); text-align: center; margin-top: 14px; line-height: 1.6; }

/* ── ALERTS ── */
.hb-alert { padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.hb-alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.hb-alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }


/* ══════════════════════════════════════
   HERO SEARCH WIDGET
   Shortcode: [hotelbook_hero_search]
══════════════════════════════════════ */

/* Outer section (with optional bg image) */
.hb-hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  background: var(--hb-dark);
  box-sizing: border-box;
}
.hb-hero-has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 420px;
}
.hb-hero-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
}

/* Hero text */
.hb-hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 36px;
}
.hb-hero-title {
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hb-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

/* The white bar */
.hb-hero-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
}
.hb-hero-form {
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: stretch;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

/* Individual field cell */
.hb-hero-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 20px;
  flex: 1;
  min-width: 0;
  position: relative;
}
.hb-hero-field-small { flex: 0 0 100px; }
.hb-hero-field-date  { flex: 1.2; }

/* Gold vertical divider */
.hb-hero-divider {
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: #e5e7eb;
}

/* Label above the input */
.hb-hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
  white-space: nowrap;
}

/* Inputs inside bar */
.hb-hero-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  font-family: inherit;
  width: 100%;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.hb-hero-input::placeholder { color: #9ca3af; font-weight: 400; }
.hb-hero-input option { color: #1a1a2e; }

/* Date field row (input + calendar icon) */
.hb-hero-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb-hero-cal-icon {
  width: 20px;
  height: 20px;
  color: var(--hb-gold);
  flex-shrink: 0;
  pointer-events: none;
}
/* Hide native date picker icon */
input[type="date"].hb-hero-input::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; width: 100%; cursor: pointer; }

/* Search button */
.hb-hero-btn {
  background: var(--hb-gold);
  color: #fff;
  border: none;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.2s ease;
  white-space: nowrap;
  border-radius: 0;
}
.hb-hero-btn:hover { background: var(--hb-gold-lt); }

/* Error message */
.hb-hero-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 10px 16px;
  border-radius: 0 0 6px 6px;
  font-size: 13px;
  margin-top: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hb-hero-form {
    flex-wrap: wrap;
    border-radius: 10px;
  }
  .hb-hero-field { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid #f1f5f9; }
  .hb-hero-field-small { flex: 1 1 calc(50% - 1px); }
  .hb-hero-divider { display: none; }
  .hb-hero-btn {
    width: 100%;
    border-radius: 0 0 10px 10px;
    padding: 16px;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .hb-hero-section { padding: 50px 14px 40px; }
  .hb-hero-field { flex: 1 1 100%; }
}
