/**
 * Accommodations & Vacation Rentals Stylesheet for Liberium CMS
 * Responsive design for chalets, Beds24 hero, 15-photo lightbox & booking widget
 */

/* ==========================================================================
   Hero Banner (Full Screen & Immersive)
   ========================================================================== */
.cms-accommodations-hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 4rem 1.5rem;
  margin-top: -1rem;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.4);
}

.cms-accommodations-hero-container {
  max-width: 1000px;
  width: 100%;
  text-align: center;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cms-hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.cms-hero-badge-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: cmsPulse 2s infinite;
}

@keyframes cmsPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.cms-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.02em;
}

.cms-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 750px;
  color: #cbd5e1;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cms-hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cms-hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  color: #f1f5f9;
}

.cms-hero-stat-item.price-stat {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}

.cms-hero-stat-item.price-stat .stat-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #34d399;
}

.cms-hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.cms-btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.cms-btn-hero-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.cms-btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cms-btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   Accommodations Main Layout Grid
   ========================================================================== */
.cms-accommodations-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .cms-accommodations-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
}

/* ==========================================================================
   Showcase Photo Gallery Grid (Airbnb Style)
   ========================================================================== */
.cms-gallery-section {
  margin-bottom: 2.5rem;
}

.cms-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cms-gallery-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color, #0f172a);
  margin: 0;
}

.cms-btn-view-all-photos {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
}

.cms-btn-view-all-photos:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cms-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  border-radius: 16px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .cms-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 180px);
  }
  .cms-gallery-cell.cell-lead {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.cms-gallery-cell {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #e2e8f0;
  border-radius: 8px;
}

.cms-gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.cms-gallery-cell:hover img {
  transform: scale(1.05);
}

.cms-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.cms-gallery-cell:hover .cms-gallery-overlay {
  opacity: 1;
}

.cms-gallery-overlay .zoom-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* ==========================================================================
   Details, Amenities & Rules Cards
   ========================================================================== */
.cms-details-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cms-about-card,
.cms-amenities-card,
.cms-rules-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cms-about-card h3,
.cms-amenities-card h3,
.cms-rules-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #0f172a;
}

.cms-desc-body {
  color: #475569;
  line-height: 1.7;
}

.cms-amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cms-amenity-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}

.cms-amenity-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.cms-amenity-info {
  display: flex;
  flex-direction: column;
}

.cms-amenity-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
}

.cms-amenity-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.cms-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #475569;
}

.cms-rules-list li::before {
  content: "✔";
  color: #10b981;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ==========================================================================
   Booking & Checkout Card (Sticky Widget)
   ========================================================================== */
.cms-booking-card {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.cms-booking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.cms-booking-rate .cms-rate-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.cms-booking-rate .cms-rate-period {
  font-size: 0.9rem;
  color: #64748b;
  margin-left: 0.25rem;
}

.cms-guarantee-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
}

.cms-booking-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cms-date-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cms-date-field,
.cms-guests-field,
.cms-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cms-date-field label,
.cms-guests-field label,
.cms-field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cms-input-date,
.cms-select-guests,
.cms-field-group input {
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cms-input-date:focus,
.cms-select-guests:focus,
.cms-field-group input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cms-guest-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

/* Dynamic Live Breakdown */
.cms-booking-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.5rem;
  border: 1px dashed #cbd5e1;
}

.cms-booking-breakdown .breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #475569;
}

.cms-booking-breakdown .breakdown-row.total-row {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.cms-btn-checkout-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem;
  background: #10b981;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cms-btn-checkout-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.cms-booking-disclaimer {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   Full-Screen 15-Photo Lightbox Modal
   ========================================================================== */
.cms-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cms-lightbox-backdrop.is-active {
  display: flex;
}

.cms-lightbox-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cms-lightbox-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.cms-lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cms-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.cms-lightbox-nav {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
  user-select: none;
}

.cms-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.cms-lightbox-image-wrap {
  max-width: 90%;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.cms-lightbox-image-wrap img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.cms-lightbox-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.cms-lightbox-counter {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
}

.cms-lightbox-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
}

.thumb-btn {
  width: 56px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-btn.active,
.thumb-btn:hover {
  opacity: 1;
  border-color: #38bdf8;
  transform: scale(1.05);
}

/* ==========================================================================
   Other Units Grid
   ========================================================================== */
.cms-other-units-section {
  margin-top: 3rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
}

.cms-other-units-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.cms-other-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.cms-other-unit-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.other-unit-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.other-unit-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.other-unit-body h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

.other-unit-price {
  font-weight: 700;
  color: #10b981;
}

.cms-btn-unit-view {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border-radius: 6px;
  text-align: center;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: auto;
}

.cms-btn-unit-view:hover {
  background: #e2e8f0;
}
