/* ═══════════════════════════════════════════════
   HotelFlow Frontend CSS  v1.2
═══════════════════════════════════════════════ */
:root {
  --hf-primary:   #2563eb;
  --hf-primary-d: #1d4ed8;
  --hf-green:     #16a34a;
  --hf-amber:     #d97706;
  --hf-red:       #dc2626;
  --hf-border:    #e2e8f0;
  --hf-bg:        #f8fafc;
  --hf-text:      #1e293b;
  --hf-muted:     #64748b;
  --hf-radius:    12px;
  --hf-shadow:    0 2px 8px rgba(0,0,0,.08);
  --hf-shadow-lg: 0 20px 60px rgba(0,0,0,.12);
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.hf-booking-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--hf-text); max-width: 1200px; margin: 0 auto; }

/* ═══════════════════════════════════════════════
   SEARCH BOX
═══════════════════════════════════════════════ */
.hf-search-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: var(--hf-radius);
  padding: 36px;
  margin-bottom: 32px;
}
.hf-search-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
  letter-spacing: -.3px;
}
.hf-search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.hf-search-field label {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 7px;
}
.hf-search-field input[type="text"],
.hf-search-field input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: all .15s;
}
.hf-search-field input::placeholder { color: rgba(255,255,255,.5); }
.hf-search-field input:focus {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.2);
  outline: none;
}

/* ── Guest Counter ──────────────────────────────────────────────── */
.hf-guest-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 8px;
  height: 44px;
  padding: 0 4px;
}
.hf-guest-btn {
  background: none;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .15s;
  flex-shrink: 0;
}
.hf-guest-btn:hover { background: rgba(255,255,255,.2); }
#hf-guests-count,
#hf-children-count {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

/* ── Price filter ────────────────────────────────────────────────── */
.hf-price-range { display: flex; align-items: center; }
.hf-price-range input { width: 100% !important; }

/* ── Search action ─────────────────────────────────────────────── */
.hf-search-action { display: flex; align-items: flex-end; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.hf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; border: none; transition: all .2s; line-height: 1.4;
}
.hf-btn-primary { background: var(--hf-primary); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.hf-btn-primary:hover { background: var(--hf-primary-d); transform: translateY(-1px); }
.hf-btn-secondary { background: var(--hf-bg); color: var(--hf-text); border: 1px solid var(--hf-border); }
.hf-btn-secondary:hover { background: #e2e8f0; color: var(--hf-text); }
.hf-btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; width: 100%; }
.hf-btn-full { width: 100%; }
.hf-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════
   LOADING
═══════════════════════════════════════════════ */
.hf-loading { text-align: center; padding: 48px; }
.hf-spinner { width: 36px; height: 36px; border: 3px solid var(--hf-border); border-top-color: var(--hf-primary); border-radius: 50%; animation: hf-spin .8s linear infinite; margin: 0 auto 16px; }
@keyframes hf-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   RESULTS HEADER + LAYOUT SWITCHER
═══════════════════════════════════════════════ */
.hf-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hf-results-header p { color: var(--hf-muted); font-size: 14px; }
.hf-layout-switcher { display: flex; gap: 4px; }
.hf-layout-btn { background: var(--hf-bg); border: 1.5px solid var(--hf-border); border-radius: 6px; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--hf-muted); transition: all .15s; }
.hf-layout-btn.active, .hf-layout-btn:hover { background: var(--hf-primary); border-color: var(--hf-primary); color: #fff; }

/* ═══════════════════════════════════════════════
   ROOMS GRID
═══════════════════════════════════════════════ */
.hf-rooms-grid, .hf-rooms-listing {
  display: grid;
  grid-template-columns: repeat(var(--hf-columns, 3), 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* ── Room Card ──────────────────────────────────────────────────── */
.hf-room-card {
  background: #fff;
  border-radius: var(--hf-radius);
  box-shadow: var(--hf-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--hf-border);
  display: flex;
  flex-direction: column;
}
.hf-room-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.hf-room-card-img { position: relative; overflow: hidden; height: 200px; }
.hf-room-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hf-room-card:hover .hf-room-card-img img { transform: scale(1.04); }
.hf-badge-featured {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .4px;
}
.hf-food-badge-img {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(21, 128, 61, .92); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; backdrop-filter: blur(4px);
}
.hf-room-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.hf-room-card-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--hf-text); }
.hf-room-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hf-room-meta span {
  font-size: 12px; color: var(--hf-muted);
  background: var(--hf-bg); padding: 3px 10px;
  border-radius: 20px; display: flex; align-items: center; gap: 4px;
}
.hf-room-desc { font-size: 13px; color: var(--hf-muted); line-height: 1.5; margin: 0 0 12px; flex: 1; }

/* ── Amenity tags ────────────────────────────────────────────────── */
.hf-room-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hf-amenity-tag {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
  background: #eff6ff; color: var(--hf-primary);
  border: 1px solid #dbeafe;
}
.hf-amenity-tag .hf-icon { width: 14px; height: 14px; }
.hf-amenity-tag .hf-icon svg { width: 14px; height: 14px; }
.hf-amenity-more { background: var(--hf-bg); color: var(--hf-muted); border-color: var(--hf-border); }

/* ── Room Footer ─────────────────────────────────────────────────── */
.hf-room-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--hf-border); margin-top: auto;
}
.hf-room-price { display: flex; flex-direction: column; }
.hf-room-price strong { font-size: 20px; font-weight: 800; color: var(--hf-primary); }
.hf-room-price span { font-size: 12px; color: var(--hf-muted); }
.hf-original-price { font-size: 13px; color: var(--hf-muted); text-decoration: line-through; }
.hf-room-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   LAYOUT VARIANTS
═══════════════════════════════════════════════ */
.hf-layout-list { grid-template-columns: 1fr !important; }
.hf-layout-list .hf-room-card { flex-direction: row; max-height: 200px; }
.hf-layout-list .hf-room-card-img { width: 260px; min-width: 260px; height: 200px; }
.hf-layout-list .hf-room-card-body { flex: 1; }
.hf-layout-masonry { columns: 3; column-gap: 20px; display: block !important; }
.hf-layout-masonry .hf-room-card { break-inside: avoid; margin-bottom: 20px; display: block; }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.hf-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 99999; display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 20px;
  overflow-y: auto; backdrop-filter: blur(2px);
  animation: hf-fade-in .2s ease;
}
@keyframes hf-fade-in { from { opacity: 0; } to { opacity: 1; } }
.hf-modal-box {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 680px;
  box-shadow: var(--hf-shadow-lg);
  animation: hf-slide-up .25s ease;
}
@keyframes hf-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--hf-border);
}
.hf-modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.hf-modal-close {
  background: var(--hf-bg); border: none; width: 32px; height: 32px;
  border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--hf-muted);
  display: flex; align-items: center; justify-content: center;
}
.hf-modal-close:hover { background: #e2e8f0; }
.hf-modal-body { padding: 24px; }

/* ═══════════════════════════════════════════════
   BOOKING FORM (modal)
═══════════════════════════════════════════════ */
.hf-booking-form h4 {
  font-size: 12px; font-weight: 700; color: var(--hf-muted);
  text-transform: uppercase; letter-spacing: .5px; margin: 18px 0 10px;
}
.hf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0; }
.hf-field { margin-bottom: 12px; }
.hf-field label {
  display: block; font-size: 12px; font-weight: 600;
  margin-bottom: 5px; color: var(--hf-text);
  text-transform: uppercase; letter-spacing: .3px;
}
.hf-field input, .hf-field select, .hf-field textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--hf-border); border-radius: 8px;
  font-size: 14px; box-sizing: border-box; transition: border-color .15s; font-family: inherit;
}
.hf-field input:focus, .hf-field select:focus, .hf-field textarea:focus {
  border-color: var(--hf-primary); outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ── Booking Summary ─────────────────────────────────────────────── */
.hf-booking-summary {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;
}
.hf-booking-summary > div { display: flex; flex-direction: column; gap: 2px; }
.hf-booking-summary label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--hf-primary); }
.hf-booking-summary span { font-size: 13px; font-weight: 700; color: var(--hf-text); }

/* ── Coupon ──────────────────────────────────────────────────────── */
.hf-coupon-row { display: flex; gap: 8px; margin-bottom: 6px; }
.hf-coupon-row input { flex: 1; padding: 10px 13px; border: 1.5px solid var(--hf-border); border-radius: 8px; font-size: 14px; }
#hf-coupon-msg { padding: 8px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; }
#hf-coupon-msg.hf-success { background: #dcfce7; color: #15803d; }
#hf-coupon-msg.hf-error   { background: #fee2e2; color: #b91c1c; }

/* ── Payment Options ─────────────────────────────────────────────── */
.hf-payment-options, .hf-payment-type { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hf-payment-option {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1.5px solid var(--hf-border);
  border-radius: 8px; cursor: pointer; font-size: 13px;
  font-weight: 500; transition: all .15s;
}
.hf-payment-option:has(input:checked) { border-color: var(--hf-primary); background: #eff6ff; color: var(--hf-primary); }
.hf-payment-option input { margin: 0; }

/* ── Price Summary ───────────────────────────────────────────────── */
.hf-price-summary {
  background: var(--hf-bg); border-radius: 10px;
  padding: 14px 16px; margin: 14px 0;
}
.hf-price-summary table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hf-price-summary td { padding: 4px 0; color: var(--hf-muted); }
.hf-price-summary td:last-child { text-align: right; font-weight: 600; }
.hf-grand-total td { font-size: 15px; font-weight: 800; padding-top: 10px; border-top: 2px solid var(--hf-border); color: var(--hf-text) !important; }
.hf-discount-row td { color: var(--hf-green) !important; }

/* ── Food options (modal) ────────────────────────────────────────── */
.hf-food-select-section { display: flex; flex-direction: column; gap: 7px; margin: 8px 0; }
.hf-food-option-label {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1.5px solid var(--hf-border);
  border-radius: 8px; cursor: pointer; transition: all .15s;
}
.hf-food-option-label:has(input:checked) { border-color: var(--hf-green); background: #f0fdf4; }
.hf-food-option-label input { margin: 0; }
.hf-food-option-info { display: flex; justify-content: space-between; align-items: center; flex: 1; }
.hf-food-option-info span:first-child { font-size: 14px; font-weight: 600; }
.hf-food-price-tag { font-size: 13px; font-weight: 700; color: var(--hf-green); }

/* ── Food badge ──────────────────────────────────────────────────── */
.hf-food-badge { font-size: 12px; background: #f0fdf4; color: #15803d; border: 1px solid #86efac; padding: 3px 10px; border-radius: 20px; font-weight: 500; }

/* ── Secure note ─────────────────────────────────────────────────── */
.hf-secure-note { text-align: center; font-size: 12px; color: var(--hf-muted); margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ── Success box ─────────────────────────────────────────────────── */
.hf-success-box { text-align: center; padding: 48px 40px !important; }
.hf-success-icon { font-size: 56px; margin-bottom: 14px; }
.hf-success-box h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: var(--hf-green); }
.hf-success-box p { font-size: 14px; color: var(--hf-muted); margin-bottom: 6px; }

/* ── Badges ──────────────────────────────────────────────────────── */
.hf-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.hf-status-confirmed { background: #dcfce7; color: #15803d; }
.hf-status-pending   { background: #fef9c3; color: #854d0e; }
.hf-status-cancelled { background: #fee2e2; color: #b91c1c; }
.hf-status-completed { background: #dbeafe; color: #1d4ed8; }
.hf-status-noshow    { background: #f1f5f9; color: #475569; }

/* ── My Bookings ─────────────────────────────────────────────────── */
.hf-my-bookings h3 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.hf-bookings-list { display: flex; flex-direction: column; gap: 14px; }
.hf-booking-item { background: #fff; border: 1px solid var(--hf-border); border-radius: var(--hf-radius); padding: 16px; box-shadow: var(--hf-shadow); }
.hf-booking-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hf-booking-item-body p { font-size: 13px; color: var(--hf-muted); margin: 4px 0; }

/* ═══════════════════════════════════════════════
   SVG ICON
═══════════════════════════════════════════════ */
.hf-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hf-icon svg { width: 100%; height: 100%; display: block; }

/* ═══════════════════════════════════════════════
   ROOM DETAIL PAGE (WooCommerce layout)
═══════════════════════════════════════════════ */
.hf-rd-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; font-family: inherit; color: var(--hf-text); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hf-rooms-grid, .hf-rooms-listing { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hf-search-form { grid-template-columns: 1fr 1fr; }
  .hf-rooms-grid, .hf-rooms-listing { grid-template-columns: 1fr; --hf-columns: 1; }
  .hf-field-row { grid-template-columns: 1fr; }
  .hf-modal-overlay { padding: 20px 12px; }
  .hf-payment-options { flex-direction: column; }
  .hf-layout-list .hf-room-card { flex-direction: column; max-height: none; }
  .hf-layout-list .hf-room-card-img { width: 100%; }
  .hf-layout-masonry { columns: 1; }
}
@media (max-width: 480px) {
  .hf-search-form { grid-template-columns: 1fr; }
  .hf-room-card-actions { flex-direction: column; width: 100%; }
  .hf-room-card-actions .hf-btn { width: 100%; justify-content: center; }
  .hf-room-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
