/**
 * Styles for the Ratehawk_Homepage_Hotels shortcode
 * (ratehawk-homepage-hotels-API.php). Self-contained — does NOT depend on
 * homepage-hotel-style.css.
 *
 * Sections:
 *   1. Hero + eyebrow + title + subtitle
 *   2. Outer container (.rh-home-wrap) + filter panel override
 *   3. Search bar (destination / dates / guests / button)
 *   4. Trust badges
 *   5. Dropdowns (destination / date calendar / guests panel)
 *   6. Slick carousel wrapper + arrows
 *   7. Hotel card layout
 *   8. Skeleton + spinner animations
 *   9. Stale-search state (dates/guests changed but SEARCH not re-clicked)
 *  10. No-match empty state
 *  11. Responsive
 */

/* ── 1. Hero ─────────────────────────────────────────────────────────────── */
 .hero {
    position: relative;
    overflow: visible;
    height: auto;
    padding: 52px 0 35px;
    margin-bottom: 24px;
    background: #ffffff !important;
    border-top: none;
    z-index: 1;
    border-bottom: unset !important;
}
.rh-home-page {
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.rh-home-page *, .rh-home-page *::before, .rh-home-page *::after { box-sizing: border-box; }

.rh-home-page .hero {
  position: relative;
  overflow: visible;
  padding: 52px 0 20px;
}
.rh-home-page .hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1170px;
  padding: 0 40px;
  margin: 0 auto;
  text-align: center;
}
.rh-home-page .hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: #2B7DC9;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.rh-home-page .hero-title {
  width: 80%;
  margin: 0 auto 14px;
  color: #1a2540;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-family: Tahoma, Geneva, sans-serif;
}
.rh-home-page .hero-subtitle {
  color: #5a6478;
  font-size: 17px;
  margin: 0 auto 32px;
  line-height: 1.55;
  max-width: 620px;
}
.rh-home-page .color-accent { color: #f5a623; }

/* ── 2. Outer container + filter-panel override ──────────────────────────── */
.rh-home-wrap {
    max-width: 1170px;
    margin: 5px auto 48px;
    border: 1px solid #cfe0f5;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgb(20 41 62 / .10), 0 1px 4px rgb(20 41 62 / .06);
    overflow: hidden;
    background: #fff;
}
.rh-home-wrap .filter-panel { display: block !important; }
.rh-home-wrap #type-banner:empty { display: none; }
.filter-panel {
    background: #f4f8fd !important;
    border: none !important;
    border-bottom: 1px solid #d4e6f7 !important;
    border-radius: unset !important;
    margin: 0 auto 24px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    padding: 14px 20px;
}
.rh-home-wrap-search { position: relative; }
.rh-home-wrap .search-bar { position: relative; }
.rh-home-wrap-search .search-bar-field { position: relative; }

/* ── 3. Search bar ───────────────────────────────────────────────────────── */
.rh-home-page .search-bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  border: 1px solid #d8e2ee;
  max-width: 995px;
  margin: 0 auto;
  overflow: visible;
  position: relative;
}
.rh-home-page .search-bar-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  position: relative;
  border-right: 1px solid #e6ebf4;
}
.rh-home-page .search-bar-field:last-of-type { border-right: none; }
.rh-home-page .search-bar-field--dest   { flex: 0 0 26%; }
.rh-home-page .search-bar-field--dates  { flex: 1 1 36%; }
.rh-home-page .search-bar-field--guests { flex: 0 0 28%; border-right: none; }
.rh-home-page .search-bar-val-row {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 15px; font-weight: 700; color: #0d1b2a; line-height: 1.4;
}
.rh-home-page .field-icon { flex-shrink: 0; display: block; }
.rh-home-page .search-bar-daterange {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  border: none; background: transparent;
  font-size: 15px; font-weight: 700; color: #0d1b2a;
  padding: 0; outline: none; cursor: pointer; line-height: 1.4;
  flex: 1; min-width: 0;
}
.rh-home-page .guest-summary { font-size: 15px; font-weight: 700; color: #0d1b2a; flex: 1; min-width: 0; }
.rh-home-page .search-bar-btn {
  flex-shrink: 0; background: #2872cc; color: #fff; border: none;
  padding: 0 28px; font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 10px; transition: background .2s, box-shadow .2s;
  letter-spacing: .8px; text-transform: uppercase; white-space: nowrap;
  min-height: 50px; align-self: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.rh-home-page .search-bar-btn:hover    { background: #1a5fb8; box-shadow: 0 4px 18px rgba(40,114,204,.35); }
.rh-home-page .search-bar-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── 4. Trust badges ─────────────────────────────────────────────────────── */
.rh-home-page .trust-badges {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; margin-top: 20px; flex-wrap: wrap;
}
.rh-home-page .trust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #444; white-space: nowrap;
}
.rh-home-page .trust-badge svg { flex-shrink: 0; }

/* ── 5. Dropdowns (shared shell + destination + guests panel) ────────────── */
.rh-home-dd { position: absolute; top: calc(100% + 8px); background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; box-shadow: 0 10px 40px rgba(20,41,62,.18); padding: 16px; min-width: 260px; display: none; z-index: 20; }
.rh-home-dd.open { display: block; }
.rh-home-dd--left  { left: 0; }
.rh-home-dd--right { right: 0; }

.rh-home-dd label.rh-home-loc-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: #14293e; }
.rh-home-dd label.rh-home-loc-opt:hover { background: #f4f7fc; }
.rh-home-dd label.rh-home-loc-opt input { margin: 0; accent-color: #2872cc; }
#rh-home-dd-loc { min-width: 260px; padding: 8px; }

.rh-home-guest-panel { min-width: 300px; padding: 18px 20px 16px; }
.rh-home-guest-title { font-size: 14px; font-weight: 700; color: #14293e; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px solid #eef1f6; }
.rh-home-guest-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.rh-home-guest-row + .rh-home-guest-row { border-top: 1px solid #f0f3f8; }
.rh-home-guest-labelblock { display: flex; flex-direction: column; gap: 2px; }
.rh-home-guest-name { font-size: 12px; font-weight: 700; color: #14293e; letter-spacing: .3px; }
.rh-home-guest-sub  { font-size: 11px; color: #8a96aa; font-weight: 500; }
.rh-home-guest-stepper { display: flex; align-items: center; gap: 12px; }
.rh-home-guest-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #c5cddc; background: #fff; cursor: pointer; font-size: 16px; font-weight: 600; color: #14293e; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; transition: border-color .15s, background .15s; }
.rh-home-guest-btn:hover { border-color: #2872cc; color: #2872cc; }
.rh-home-guest-btn:disabled { opacity: .35; cursor: not-allowed; }
.rh-home-guest-val { min-width: 24px; text-align: center; font-weight: 700; font-size: 15px; color: #14293e; }
.rh-home-guest-update { display: block; width: 100%; margin-top: 14px; padding: 11px; background: #2872cc; color: #fff; border: none; border-radius: 10px; font-weight: 700; font-size: 14px; letter-spacing: .3px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.rh-home-guest-update:hover { background: #1a5fb8; box-shadow: 0 4px 14px rgba(40,114,204,.35); }

button#rh-home-cal-clear-in, button#rh-home-cal-clear-out { display: none !important; }

/* ── 6. Slick carousel wrapper + arrows ──────────────────────────────────── */
.rh-home-slick-wrap { position: relative; padding: 0 54px; margin: 20px 0 40px; }
.rh-home-slick-slider { min-height: 480px; }
.rh-home-slick-slider .slick-track { display: flex !important; }
.rh-home-slick-slider .slick-slide { height: inherit !important; padding: 0 10px; box-sizing: border-box; }
.rh-home-slick-slider .slick-slide > div { height: 100%; }
.rh-home-slick-arrow {
  position: absolute; top: 45%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid #e3e9f2;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  color: #14293e; transition: background .15s, color .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(20,41,62,.10);
}
.rh-home-slick-arrow:hover { background: #14293e; color: #fff; }
.rh-home-slick-arrow.rh-home-slick-prev { left: 0; }
.rh-home-slick-arrow.rh-home-slick-next { right: 0; }
.rh-home-slick-arrow.slick-disabled { opacity: .35; cursor: default; }

/* ── 7. Hotel card ───────────────────────────────────────────────────────── */
.rh-home-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border-radius: 16px;
  border: 1px solid #ececea; overflow: hidden;
  box-shadow: 0 2px 12px rgba(20,41,62,.06);
  transition: transform .18s, box-shadow .18s;
}
.rh-home-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,41,62,.12); }
.rh-home-card__img-wrap { height: 200px; background: #f5f4f0; overflow: hidden; }
.rh-home-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-home-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.rh-home-card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #8a897f; }
.rh-home-card__stars {
    color: #f5a623 !important;
    font-size: 13px !important;
    letter-spacing: 1.5px;
    line-height: 1;
    flex-shrink: 0;
}
.rh-home-card__location { color: #8a897f; }
.rh-home-card__name { font-size: 16px; font-weight: 700; color: #14293e; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.rh-home-card__desc { font-size: 13px; color: #55627a; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-home-card__refund { display: inline-flex; align-self: flex-start; font-size: 12px; font-weight: 600; color: #2d7a5a; background: #edf7f2; padding: 3px 10px; border-radius: 20px; }
.rh-home-card__rating-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rh-home-card__rating-score { background: #f5a623; color: #fff; font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 6px; }
.rh-home-card__rating-label { font-size: 13px; font-weight: 600; color: #14293e; }
.rh-home-card__rating-count { font-size: 12px; color: #8a897f; }
.rh-home-card__price-section { margin-top: auto; padding-top: 12px; border-top: 1px solid #f0efeb; }
.rh-home-card__price-night { font-size: 22px; font-weight: 700; color: #14293e; }
.rh-home-card__price-night span { font-size: 13px; font-weight: 500; color: #55627a; }
.rh-home-card__price-total { font-size: 13px; color: #55627a; margin-top: 2px; }
.rh-home-card__tax-note { font-size: 12px; color: #2d7a5a; margin-top: 2px; }
.rh-home-card__cta {
  display: block; width: 100%; margin-top: 12px;
  background: #f5a623; color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px 18px; border: none; border-radius: 999px; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: background .15s;
}
.rh-home-card__cta:hover { background: #d98d10; color: #fff; }
.rh-home-card__cta[disabled] { background: #c5c4be; cursor: not-allowed; }

/* ── 8. Skeleton + spinner animations ────────────────────────────────────── */
/* Row wrapper — lays skeleton cards 3-across (2 on tablet, 1 on mobile) so
   the pre-Slick layout matches the final carousel view rather than stacking
   the cards vertically. */
.rh-home-skel-row {
  display: flex;
  gap: 20px;
  padding: 0 0 8px;
  align-items: stretch;
}
.rh-home-skel-col { flex: 1 1 0; min-width: 0; }
@media (max-width: 1024px) { .rh-home-skel-col:nth-child(3) { display: none; } }
@media (max-width: 640px)  { .rh-home-skel-col:nth-child(2) { display: none; } }

/* Card-shaped skeleton — matches the real .rh-home-card silhouette so the
   layout doesn't shift when real cards mount. Each grey block has a subtle
   left-to-right shimmer sweep to signal "loading". */
.rh-home-skel-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px;
  border: 1px solid #ececea; overflow: hidden;
  box-shadow: 0 2px 12px rgba(20,41,62,.06);
  min-height: 480px;
}
.rh-home-skel-img {
  height: 200px; background: #ece9e2;
  position: relative; overflow: hidden;
}
.rh-home-skel-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rh-home-skel-line {
  height: 12px; background: #ece9e2; border-radius: 6px;
  position: relative; overflow: hidden;
}
.rh-home-skel-btn {
  height: 42px; background: #ece9e2; border-radius: 999px;
  margin-top: auto; position: relative; overflow: hidden;
}
/* Shared shimmer sweep — reuses the same pseudo-element on every skeleton block. */
.rh-home-skel-img::after,
.rh-home-skel-line::after,
.rh-home-skel-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: rh-home-shimmer 1.4s ease-in-out infinite;
}
@keyframes rh-home-shimmer { 100% { transform: translateX(100%); } }
@keyframes rh-home-spin    { to  { transform: rotate(360deg); } }

/* Legacy single-block skeleton kept for backward-compat with any older calls. */
.rh-home-skeleton { background: #f5f4f0; border-radius: 16px; height: 480px; animation: rh-home-pulse 1.4s ease-in-out infinite; }
@keyframes rh-home-pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* ── 9. Stale-search state ───────────────────────────────────────────────── */
.rh-home-stale-msg {
  display: none;
  align-items: flex-start;
  gap: 8px;
  background: #fffbee;
  border: 1px solid #f0dfa0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: auto;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b5a1e;
}
.rh-home-stale-msg .rh-home-stale-icon { flex-shrink: 0; color: #c8a000; margin-top: 1px; }
.rh-home-stale-msg strong { color: #503f10; font-weight: 700; }
.rh-home-slick-wrap.stale .rh-home-card__price-section { display: none; }
.rh-home-slick-wrap.stale .rh-home-card__refund        { display: none; }
.rh-home-slick-wrap.stale .rh-home-stale-msg           { display: flex; }
.rh-home-slick-wrap.stale .rh-home-card                { pointer-events: none; cursor: default; }
.rh-home-slick-wrap.stale .rh-home-card:hover         { transform: none !important; box-shadow: 0 2px 12px rgba(20,41,62,.06) !important; }
.rh-home-slick-wrap.stale .rh-home-card__cta {
  pointer-events: none; cursor: default;
  background: #c8c8c8 !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* ── 10. No-match empty state ────────────────────────────────────────────── */
.rh-home-nomatch {
  max-width: 720px;
  margin: 32px auto 40px;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 16px;
  padding: 40px 32px 36px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(20,41,62,.06);
}
.rh-home-nomatch__icon {
  width: 88px; height: 88px;
  margin: 0 auto 20px;
  background: #eaf1fa;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.rh-home-nomatch__icon-x {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px;
  background: #e04b4b;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; line-height: 1;
  box-shadow: 0 1px 3px rgba(224,75,75,.35);
}
.rh-home-nomatch__title { font-size: 20px; font-weight: 700; color: #14293e; margin-bottom: 10px; }
.rh-home-nomatch__sub   { font-size: 14px; color: #55627a; margin-bottom: 20px; line-height: 1.5; max-width: 420px; margin-left: auto; margin-right: auto; }
.rh-home-nomatch__pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.rh-home-nomatch__pill {
  background: #f4f7fc; border: 1px solid #dbe4f0;
  color: #2872cc; font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: 20px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rh-home-nomatch__pill:hover { background: #e6eef8; border-color: #2872cc; }
.rh-home-nomatch__reset {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0d4f7a; color: #fff; border: none;
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  padding: 12px 26px; border-radius: 999px;
  cursor: pointer; transition: background .15s, box-shadow .15s;
}
.rh-home-nomatch__reset:hover { background: #0b3f63; box-shadow: 0 4px 14px rgba(13,79,122,.30); }
.rh-home-nomatch__reset svg { display: block; }

/* ── 11. Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .rh-home-page .hero { padding: 40px 0 18px; }
  .rh-home-page .hero-title { font-size: 32px; width: 100%; }
  .rh-home-page .hero-subtitle { font-size: 15px; }
  .rh-home-page .search-bar { flex-wrap: wrap; padding: 12px; }
  .rh-home-page .search-bar-field {
    flex: 1 1 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #e6ebf4;
    padding: 12px;
  }
  .rh-home-page .search-bar-field:last-of-type { border-bottom: none; }
  .rh-home-page .search-bar-btn { width: 100%; margin-top: 8px; }
  .rh-home-page .trust-badges { gap: 14px; }
}
