/* ==========================================================================
   ThinhWP Rental One Villa — Theme CSS
   Consolidated from HTML template's inline styles & demo-themes.css
   ========================================================================== */

/* ===== BASE RESETS ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== GLASSMORPHISM NAV (Desktop) ===== */
/* Extracted from header.php inline <style> */
.glass-nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ===== HEADER COLLAPSE PILL EFFECT ===== */
.header-expand-btn {
  display: none; /* hidden when expanded */
  align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.06); border: none;
  color: #555; cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.header-expand-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #222;
}

.header-nav-links, .header-cta-btn {
  transition: opacity 0.3s ease, transform 0.3s ease, max-width 0.4s ease;
  overflow: hidden;
}

/* Collapsed state */
.header-collapsed .header-nav-links,
.header-collapsed .header-cta-btn {
  display: none !important;
}
.header-collapsed .header-expand-btn {
  display: flex;
}
.header-collapsed {
  max-width: 180px !important;
  width: 180px;
  padding: 10px 16px 10px 20px !important;
  gap: 8px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.header-collapsed .header-logo {
  font-size: 22px !important;
}

/* ===== MOBILE DYNAMIC ISLAND ===== */
/* Extracted from header.php inline <style> */
.dynamic-island {
  transition: all 0.5s cubic-bezier(0.87, 0, 0.13, 1);
  background: #111;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 140px;
  height: 48px;
}

.island-expanded {
  width: 90vw !important;
  height: 380px !important;
  border-radius: 32px !important;
  background: rgba(20, 20, 20, 0.95);
}

.content-collapsed {
  transition: opacity 0.3s ease;
}

.island-expanded .content-collapsed {
  opacity: 0;
  pointer-events: none;
}

.content-expanded {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  transition-delay: 0s;
}

.island-expanded .content-expanded {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.2s;
}

/* ===== HERO ANIMATIONS ===== */
/* Extracted from front-page.php inline <style> */
.mix-serif {
  mix-blend-mode: difference;
  color: #fff;
}

@keyframes slowPan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-pan {
  background-size: 110% 110%;
  animation: slowPan 40s ease-in-out infinite;
}

/* ===== SCROLLBAR HIDE UTILITY ===== */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ===== HERO V2 (Split Layout) ===== */
.hero-v2-image {
  border-radius: 24px;
  overflow: hidden;
}
@media (max-width: 768px) {
  .hero-v2-image { border-radius: 16px; }
}

/* ===== ICON SIZING ===== */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

/* ===== ROOM DETAIL PAGE ===== */

/* Hero carousel (mobile) */
.hero-carousel { position: relative; width: 100%; overflow: hidden; background: #f7f7f7; }
.hero-carousel .slides { display: flex; transition: transform 0.35s ease; }
.hero-carousel .slide { min-width: 100%; }
.hero-carousel .slide img { width: 100%; height: 56vw; max-height: 420px; object-fit: cover; display: block; }
.hero-carousel .counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.hero-nav { position: absolute; top: 0; left: 0; right: 0; padding: 12px 16px; display: flex; justify-content: space-between; z-index: 10; }
.hero-nav button {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(4px);
  color: #222; box-shadow: 0 1px 4px rgba(0,0,0,0.08); transition: background 0.15s;
}
.hero-nav button:hover { background: #fff; }
.hero-nav .right { display: flex; gap: 8px; }

/* Desktop photo grid */
@media (min-width: 1024px) {
  .hero-carousel { display: none; }
  .desktop-gallery {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px; border-radius: 16px; overflow: hidden;
    max-height: 420px; cursor: pointer; position: relative;
  }
  .desktop-gallery img { width: 100%; height: 100%; object-fit: cover; }
  .desktop-gallery img:first-child { grid-row: 1 / 3; }
  .desktop-gallery img:hover { filter: brightness(0.92); transition: filter 0.2s; }
  .desktop-gallery .show-all-btn {
    position: absolute; bottom: 16px; right: 16px; background: #fff;
    border: 1px solid #222; border-radius: 8px; padding: 7px 16px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
  }
}
@media (max-width: 1023px) { .desktop-gallery { display: none !important; } }

/* Section dividers */
.section-divider { border: none; border-top: 1px solid #ebebeb; margin: 32px 0; }

/* Room detail page layout */
.page-content { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 1024px) { .page-content { padding: 32px 24px 80px; } }

.desktop-layout { display: block; }
@media (min-width: 1024px) {
  .desktop-layout { display: grid; grid-template-columns: 1fr 370px; gap: 80px; }
  .left-col { min-width: 0; }
  .mobile-only { display: none !important; }
  #amenities-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
}
@media (max-width: 1023px) {
  .desktop-only { display: none !important; }
}

/* ===== CALENDAR STYLES ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; text-align: center; }
.cal-header { padding: 8px 0; font-size: 12px; font-weight: 600; color: #b0b0b0; }
.cal-day {
  padding: 0; font-size: 14px; cursor: pointer; position: relative;
  transition: background 0.15s, color 0.15s;
  border-radius: 50%; aspect-ratio: 1; display: flex;
  align-items: center; justify-content: center; margin: 2px; box-sizing: border-box;
}
.cal-day:hover:not(.unavailable):not(.empty):not(.selected-start):not(.selected-end):not(.in-range):not(.blocked) {
  box-shadow: inset 0 0 0 2px #222;
}
.cal-day.today { font-weight: 700; }
.cal-day.unavailable { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; pointer-events: none; }
.cal-day.blocked { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; pointer-events: none; }
.cal-day.empty { pointer-events: none; }
.cal-day.selected-start, .cal-day.selected-end { background: #222; color: #fff; font-weight: 700; border-radius: 50%; }
.cal-day.in-range { background: #f0f0f0; border-radius: 0; }
.cal-day.selected-start.selected-end { border-radius: 50%; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav button { background: none; border: none; font-size: 20px; cursor: pointer; padding: 8px; color: #222; border-radius: 50%; }
.cal-nav button:hover { background: #f7f7f7; }
.cal-nav span { font-size: 16px; font-weight: 600; color: #222; }

@media (min-width: 1024px) {
  .cal-day { aspect-ratio: unset; width: 48px; height: 48px; margin: 2px auto; font-size: 14px; }
}

/* ===== BOOKING CARD (Desktop sticky) ===== */
.booking-card {
  position: sticky; top: 88px;
  border: 1px solid #ebebeb; border-radius: 12px;
  padding: 24px; box-shadow: 0 6px 16px rgba(0,0,0,0.12); background: #fff;
}
.booking-card .bc-price { font-size: 22px; font-weight: 600; color: #222; }
.booking-card .bc-price span { font-weight: 400; font-size: 16px; color: #717171; }
.booking-card .bc-fields { margin-top: 16px; border: 1px solid #b0b0b0; border-radius: 8px; overflow: visible; position: relative; }
.booking-card .bc-row { display: grid; grid-template-columns: 1fr 1fr; }
.booking-card .bc-field { padding: 10px 12px; border-bottom: 1px solid #b0b0b0; cursor: pointer; transition: background 0.15s; }
.booking-card .bc-field:hover { background: #f7f7f7; }
.booking-card .bc-field:nth-child(1) { border-right: 1px solid #b0b0b0; }
.booking-card .bc-field .bc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #222; letter-spacing: 0.05em; }
.booking-card .bc-field .bc-value { font-size: 14px; color: #222; margin-top: 2px; }
.booking-card .bc-guest { padding: 10px 12px; font-size: 14px; color: #222; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.15s; }
.booking-card .bc-guest:hover { background: #f7f7f7; }
.booking-card .bc-book-btn {
  display: block; width: 100%; padding: 14px; border-radius: 8px; border: none;
  font-size: 16px; font-weight: 600; color: #fff; cursor: pointer;
  margin-top: 16px;
}
.booking-card .bc-book-btn:hover { filter: brightness(1.05); }
.booking-card .bc-note { text-align: center; font-size: 14px; color: #717171; margin-top: 12px; }

/* ===== BOTTOM BAR (Mobile) ===== */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  background: #fff; border-top: 1px solid #ebebeb;
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
}
.bottom-bar .bb-left .bb-price { font-size: 16px; font-weight: 700; color: #222; text-decoration: underline; }
.bottom-bar .bb-left .bb-dates { font-size: 12px; color: #717171; margin-top: 2px; }
.bottom-bar .bb-btn {
  padding: 14px 24px; border-radius: 8px; border: none;
  font-size: 16px; font-weight: 600; color: #fff; cursor: pointer;
}
.bottom-bar .bb-btn:hover { filter: brightness(1.05); }
@media (min-width: 1024px) { .bottom-bar { display: none; } }
@media (max-width: 1023px) { body.has-bottom-bar { padding-bottom: 80px; } }

/* ===== REVIEWS ===== */
.review-header { text-align: center; padding: 16px 0; }
.review-header .score-big { font-size: 48px; font-weight: 800; color: #222; }
.review-categories { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0; -webkit-overflow-scrolling: touch; }
.review-categories::-webkit-scrollbar { display: none; }
.review-cat { flex-shrink: 0; border: 1px solid #ebebeb; border-radius: 24px; padding: 10px 16px; font-size: 13px; font-weight: 500; color: #222; white-space: nowrap; }
.review-cards { display: flex; gap: 16px; overflow-x: auto; padding: 16px 0; -webkit-overflow-scrolling: touch; }
.review-cards::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .review-cards { display: grid; grid-template-columns: 1fr 1fr; overflow-x: visible; gap: 24px; }
}
.review-card { flex-shrink: 0; width: 300px; border: 1px solid #ebebeb; border-radius: 12px; padding: 24px; }
@media (min-width: 1024px) { .review-card { width: auto; border: none; border-radius: 0; padding: 0; } }

/* ===== SHOW MORE / SHOW ALL BUTTONS ===== */
.show-more-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 16px; font-weight: 600; color: #222; text-decoration: underline;
  background: none; border: none; cursor: pointer; padding: 8px 0;
}
.show-all-amenities, .show-all-reviews {
  display: block; width: 100%; padding: 14px; border: 1px solid #222; border-radius: 8px;
  background: #fff; font-size: 16px; font-weight: 600; color: #222; cursor: pointer;
  text-align: center; margin-top: 16px;
}
.show-all-amenities:hover, .show-all-reviews:hover { background: #f7f7f7; }

/* ===== DRAWER (Slide-up panels) ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden; transition: all 0.25s;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }
.drawer-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 111;
  background: #fff; border-radius: 16px 16px 0 0;
  max-height: 85vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  padding: 24px 24px 32px;
}
.drawer-overlay.is-open .drawer-panel { transform: translateY(0); }

/* ===== MISC ===== */
.title-area h1 { font-size: 26px; font-weight: 600; line-height: 1.2; margin: 0 0 4px; color: #222; }
.title-area .subtitle { font-size: 14px; color: #717171; }
.highlight-item { display: flex; gap: 16px; padding: 16px 0; }
.amenity-item { display: flex; align-items: center; gap: 16px; padding: 12px 0; font-size: 16px; color: #222; }
.bed-card { display: inline-block; border: 1px solid #ebebeb; border-radius: 12px; padding: 24px; min-width: 200px; }

/* ===== BOOKING PAGE STYLES ===== */
.booking-page { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.summary-card { border: 1px solid #ddd; border-radius: 12px; padding: 24px; margin-top: 24px; }
.info-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 0; border-bottom: 1px solid #ebebeb;
}
.info-row:last-child { border-bottom: none; }
.info-row-label { font-size: 16px; font-weight: 600; color: #222; }
.info-row-value { font-size: 14px; color: #717171; margin-top: 2px; }
.info-row-btn {
  padding: 8px 16px; border: 1px solid #222; border-radius: 8px; background: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; color: #222; white-space: nowrap;
  flex-shrink: 0; transition: background 0.15s;
}
.info-row-btn:hover { background: #f7f7f7; }
.urgency-inline { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 14px; color: #e31c5f; font-weight: 500; }
.payment-card { border: 1px solid #ddd; border-radius: 12px; overflow: hidden; }
.radio-option { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #ebebeb; cursor: pointer; }
.radio-circle { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b0b0b0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.radio-option.active .radio-circle { border-color: #222; }
.radio-option.active .radio-circle::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #222; }

/* Sticky bottom (mobile booking) */
.sticky-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; border-top: 1px solid #ebebeb;
  padding: 16px 24px; padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.sticky-bottom button {
  width: 100%; padding: 16px; border-radius: 12px; border: none;
  background: #222; color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
@media (min-width: 1024px) {
  .sticky-bottom { display: none; }
  .booking-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; margin-top: 32px; }
  .booking-grid .col-right { position: sticky; top: 100px; align-self: start; }
  .summary-card { margin-top: 0; }
}
@media (max-width: 1023px) {
  .booking-grid .col-left { order: 2; }
  .booking-grid .col-right { order: 1; }
}

/* Guest counter */
.guest-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #ebebeb; }
.guest-counter { display: flex; align-items: center; gap: 16px; }
.guest-counter button {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #b0b0b0;
  background: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.guest-counter button:hover { border-color: #222; }
.guest-counter button:disabled { opacity: 0.3; cursor: not-allowed; }

/* Price line */
.price-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 16px; color: #222; }
.price-line.total { font-weight: 700; border-top: 1px solid #ddd; padding-top: 16px; margin-top: 8px; }

/* Form groups */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: #222; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; border: 1px solid #ddd; border-radius: 10px;
  font-size: 15px; color: #222; background: #fff; outline: none;
  transition: border-color 0.15s; font-family: inherit; box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus { border-color: #222; }
.form-group textarea { resize: vertical; min-height: 80px; }

/* ===== PHOTO MODAL ===== */
.photo-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #fff; z-index: 9999; overflow-y: auto; flex-direction: column;
}
.photo-modal-overlay.open { display: flex; }

/* Photo Lightbox */
.photo-lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.92); z-index: 10000;
  align-items: center; justify-content: center; flex-direction: column;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }

/* ===== WORDPRESS SPECIFIC ===== */
/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip to content link — visible on focus for keyboard navigation */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  padding: 12px 24px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-to-content:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 2px solid #c99846;
  outline-offset: 2px;
}

/* ===== LUCIDE SVG ICONS ===== */
/* Rotated chevron for dropdowns */
svg.rotated {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* Arrow icons animation on hover */
.arrow-icon {
  transition: transform 0.3s ease;
}

button:hover .arrow-icon {
  transform: translate(2px, -2px);
}
