/**
 * ═══════════════════════════════════════════════════════════════════════════════
 * PROPRIETATE.HTML — PAGE STYLES
 * ═══════════════════════════════════════════════════════════════════════════════
 *
 * Pagină detalii proprietate cu: galerie, descriere, hartă, recenzii, calendar,
 * booking sidebar și modale.
 *
 * Efect unic: "Property Showcase"
 * - Gallery morph + Rating pulse + Map reveal + Calendar highlight
 * - Booking sticky float + Review cards stagger
 *
 * Autor: Negoiță Andreea Iuliana | Coordonator: conf.univ.dr. Toader Florentina
 * ═══════════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   IMPORTS — COMPONENT STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

@import url('./components/gallery.css');
@import url('./components/booking.css');
@import url('./components/reviews.css');
@import url('./components/calendar.css');
@import url('./components/map.css');
@import url('./components/modals.css');

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Global SVG icon fallback - prevent giant icons */
svg:not([width]):not([height]):not(.logo-svg) {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Global overflow fix */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  width: 100%;
}

.page-property {
  --property-max-width: 1400px;
  --property-content-gap: var(--space-8);
  --property-sidebar-width: 380px;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

.property-content {
  flex: 1;
  padding-top: calc(72px + var(--space-8)); /* header height + spacing */
  padding-bottom: var(--space-16);
  overflow-x: hidden;
}

.property-content > .container {
  max-width: var(--property-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────
   Main Layout Grid (Details + Sidebar)
   ───────────────────────────────────────────────────────── */
.property-layout {
  display: grid;
  grid-template-columns: 1fr var(--property-sidebar-width);
  gap: var(--space-12);
  align-items: start;
}

.property-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

/* ─────────────────────────────────────────────────────────
   Section Styles
   ───────────────────────────────────────────────────────── */
.property-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.property-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────
   Section Header Fancy (with icon circle)
   ───────────────────────────────────────────────────────── */
.section-header-fancy {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.section-icon-circle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  flex-shrink: 0;
}

.section-icon-circle.gold {
  background: linear-gradient(135deg, #f59e0b, #eab308);
}

.section-icon-circle svg {
  width: 24px;
  height: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PROPERTY HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */

.property-header,
.property-header-wow {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.property-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Badge variants for property */
.badge-featured {
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: white;
}

.badge-instant {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
}

.badge-superhost {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
}

.badge .icon-3d-inline {
  width: 14px;
  height: 14px;
  margin-right: var(--space-1);
  vertical-align: middle;
}

.property-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}

.property-location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.property-location .icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.property-rating {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.rating-stars .star {
  width: 18px;
  height: 18px;
  color: #fbbf24;
}

.rating-value {
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.review-count {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: underline;
  cursor: pointer;
}

.review-count:hover {
  color: var(--color-text);
}

/* Location Row */
.property-location-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}

.property-location-row .location-icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.property-location-row .location-text {
  font-size: var(--text-base);
}

.property-location-row .location-link {
  color: var(--color-primary);
  font-size: var(--text-sm);
  text-decoration: underline;
  margin-left: var(--space-2);
}

.property-location-row .location-link:hover {
  color: var(--color-primary-hover);
}

/* Rating Row */
.property-rating-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.property-rating-row .rating-display {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.property-rating-row .star-icon-filled {
  width: 18px;
  height: 18px;
  color: #fbbf24;
}

.property-rating-row .rating-value {
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.property-rating-row .rating-dot {
  color: var(--color-text-muted);
}

.property-rating-row .review-count-link {
  color: var(--color-text-muted);
  text-decoration: underline;
  font-size: var(--text-sm);
}

.property-rating-row .review-count-link:hover {
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   QUICK INFO (Stats row)
   ═══════════════════════════════════════════════════════════════════════════════ */

.property-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.quick-info-item,
.info-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: var(--text-base);
}

.info-icon-circle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.info-icon-circle svg,
.info-item .icon {
  width: 22px;
  height: 22px;
}

.info-text {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HOST CARD
   ═══════════════════════════════════════════════════════════════════════════════ */

.property-host,
.property-host-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.host-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
  background: var(--color-surface);
}

/* Buton Contactă - Modern Style */
.btn-contact-host {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  border-radius: var(--radius-xl);
  color: white;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.btn-contact-host:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.4);
}

.btn-contact-host svg {
  width: 16px;
  height: 16px;
}

.host-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.host-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.host-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

.host-since {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.verification-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DESCRIPTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.property-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.property-description p {
  margin: 0 0 var(--space-4) 0;
}

.property-description p:last-child {
  margin-bottom: 0;
}

.property-description.truncated {
  max-height: 150px;
  overflow: hidden;
  position: relative;
}

.property-description.truncated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--transition-fast);
}

.btn-text:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/*
 * BUG REPARAT: textul butonului „Rezerva acum" era invizibil in toate temele.
 *
 * Regula `.btn-text` de mai sus este scrisa pentru butoanele-link, deci pune
 * culoarea principala pe text. Aceeasi clasa este insa folosita si pentru
 * <span class="btn-text"> din interiorul lui #btnReserve, care are fundal
 * degradat in exact aceeasi culoare principala. Rezultatul: contrast 1.00:1
 * la inceputul degradeului — text de aceeasi culoare cu fundalul.
 *
 * Cand `.btn-text` se afla intr-un buton plin, preia culoarea butonului.
 */
.btn .btn-text,
.btn .btn-text:hover {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AMENITIES GRID
   ═══════════════════════════════════════════════════════════════════════════════ */

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.amenity-item:hover {
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.amenity-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
}

.amenity-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.amenity-text {
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HOUSE RULES
   ═══════════════════════════════════════════════════════════════════════════════ */

.house-rules,
.house-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.rule-item,
.rule-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.rule-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rule-item .icon,
.rule-icon-circle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.rule-icon-circle svg {
  width: 20px;
  height: 20px;
}

/* Rule icon color variants */
.rule-icon-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.rule-icon-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.rule-icon-info {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.rule-icon-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rule-info,
.rule-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rule-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rule-value {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SIMILAR PROPERTIES SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.similar-properties,
.similar-properties-section {
  padding: var(--space-12) 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  overflow-x: hidden;
}

.similar-properties .container,
.similar-properties-section .container {
  max-width: var(--property-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  overflow-x: hidden;
}

.similar-properties .section-header,
.section-title-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.section-title-centered .section-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.properties-carousel,
.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

/* Property Cards - compact horizontal layout */
.property-card-wow {
  position: relative;
  background: var(--color-bg-card, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.property-card-wow:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.property-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.property-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.property-card-wow:hover .property-card-image img {
  transform: scale(1.05);
}

.property-card-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  gap: var(--space-2);
}

.property-card-content {
  padding: var(--space-4);
}

.property-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.property-card-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.property-card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.property-card-rating svg {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}

.property-card-location {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.property-card-info {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.property-card-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.property-card-price .price-value {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.property-card-price .price-period {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST CONTAINER
   ═══════════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast, 9999);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE OVERLAY (for bottom sheets)
   ═══════════════════════════════════════════════════════════════════════════════ */

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .property-layout {
    grid-template-columns: 1fr;
  }

  .booking-sidebar {
    position: fixed;
    bottom: 80px; /* above mobile bar */
    left: var(--space-4);
    right: var(--space-4);
    z-index: var(--z-sticky);
    display: none; /* Hidden on tablet, use mobile bar */
  }

  .properties-carousel {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Fix overflow - prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
  }

  .page-property {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .property-content {
    padding-top: calc(72px + var(--space-4));
    overflow-x: hidden;
  }

  .property-content > .container {
    padding: 0 var(--space-4);
    max-width: 100%;
    overflow-x: hidden;
  }

  /* All sections - contain within viewport */
  .property-section,
  .property-details,
  .property-layout {
    max-width: 100%;
    overflow-x: hidden;
  }

  .property-title {
    font-size: var(--text-2xl);
    word-wrap: break-word;
    line-height: 1.3;
  }

  /* Property header */
  .property-header-wow,
  .property-header {
    gap: var(--space-2);
  }

  .property-badges {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .property-location-row {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .property-quick-info {
    gap: var(--space-3);
    flex-wrap: wrap;
    padding: var(--space-4) 0;
  }

  .quick-info-item,
  .info-item {
    flex: 1 1 45%;
    min-width: 130px;
    gap: var(--space-2);
  }

  .info-icon-circle {
    width: 40px;
    height: 40px;
  }

  .info-icon-circle svg {
    width: 20px;
    height: 20px;
  }

  /* Amenities */
  .amenities-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* House rules - 2 columns, 2 rows */
  .house-rules,
  .house-rules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .rule-item,
  .rule-card {
    padding: var(--space-3);
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }

  .rule-icon,
  .rule-icon-circle {
    width: 40px;
    height: 40px;
  }

  /* Host card */
  .property-host,
  .property-host-card {
    flex-direction: column;
    text-align: center;
    padding: var(--space-4);
  }

  .host-info {
    align-items: center;
  }

  /* Similar properties */
  .properties-carousel,
  .similar-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .similar-properties .container,
  .similar-properties-section .container {
    padding: 0 var(--space-4);
  }

  /* Location section */
  .location-info,
  .location-details {
    flex-direction: column;
    gap: var(--space-3);
  }

  .location-item {
    width: 100%;
  }

  /* Map */
  .property-map,
  .map-container {
    height: 250px;
    border-radius: var(--radius-lg);
  }

  /* Safe area for mobile booking bar */
  .property-content {
    padding-bottom: calc(80px + var(--space-8) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .property-host {
    flex-direction: column;
    text-align: center;
  }

  .host-info {
    align-items: center;
  }

  .properties-carousel,
  .similar-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

@media print {
  .main-header,
  .main-footer,
  .booking-sidebar,
  .mobile-booking-bar,
  .gallery-lightbox,
  .modal,
  .toast-container {
    display: none !important;
  }

  .property-content {
    padding-top: 0;
  }

  .property-layout {
    display: block;
  }

  .property-section {
    page-break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════════
   SKELETON LOADING STATES
   ═══════════════════════════════════════════════════════════════════════════════ */

.skeleton-bg {
  background: linear-gradient(90deg,
    rgba(99, 102, 241, 0.1) 25%,
    rgba(99, 102, 241, 0.2) 50%,
    rgba(99, 102, 241, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-loader.loading {
  background: linear-gradient(90deg,
    var(--color-surface, #1e293b) 25%,
    var(--color-surface-2, #334155) 50%,
    var(--color-surface, #1e293b) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ICON 3D INLINE
   ═══════════════════════════════════════════════════════════════════════════════ */

.icon-3d,
.icon-3d-inline {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.icon-3d svg,
.icon-3d-inline svg {
  width: 100%;
  height: 100%;
}

/* Section icons */
.section-icon,
.btn-icon,
.btn-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.section-icon svg,
.btn-icon svg,
/* ---------------------------------------------------------
   Descrierea: pliata pana la apasarea butonului „Citeste mai mult".

   Butonul exista in pagina de la inceput, dar nu avea NICI stil de pliere,
   NICI handler in JS: textul era mereu intreg, iar apasarea nu facea nimic.
   In plus `page.js` scrie descrierea reala peste tot continutul
   containerului (`setText('#propertyDescription', ...)`), deci vechea
   sectiune `.description-collapsed` nici nu mai exista la rulare.
   Plierea se face acum pe containerul real, cu o limita de inaltime, si
   doar cand chiar exista text ascuns (clasa pusa din JS).
   --------------------------------------------------------- */
.property-description {
  position: relative;
}

.property-description.are-continut-ascuns:not(.is-expanded) {
  max-height: 11.5em;
  overflow: hidden;
}

/* Estompare la baza, ca sa se vada ca textul continua. */
.property-description.are-continut-ascuns:not(.is-expanded)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.96));
}

.btn-expand-icon {
  transition: transform 0.25s ease;
}

.btn-expand[aria-expanded="true"] .btn-expand-icon {
  transform: rotate(180deg);
}

.btn-expand-icon svg {
  width: 100%;
  height: 100%;
}

/* Location icon (smaller) */
.location-icon {
  width: 16px;
  height: 16px;
}

/* Star icon (rating) */
.star-icon-filled {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODERN FEATURE BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Vezi toate facilitățile / Vezi toate recenziile - modern style */
.btn-all-amenities,
.btn-reviews-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-all-amenities::before,
.btn-reviews-more::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-all-amenities:hover,
.btn-reviews-more:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.3);
}

.btn-all-amenities:hover::before,
.btn-reviews-more:hover::before {
  opacity: 1;
}

.btn-all-amenities svg,
.btn-reviews-more svg,
.btn-all-amenities .btn-icon,
.btn-reviews-more .btn-icon {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  transition: transform var(--transition-base);
}

.btn-all-amenities:hover svg,
.btn-reviews-more:hover svg {
  transform: scale(1.15);
}

/* Button text needs z-index too */
.btn-all-amenities span,
.btn-reviews-more span {
  position: relative;
  z-index: 1;
}

/* Deschide în Google Maps - attractive button */
#btnOpenInMaps {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, #4285f4, #34a853);
  border: none;
  border-radius: var(--radius-xl);
  color: white;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

#btnOpenInMaps:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
}

#btnOpenInMaps svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BTN-EXPAND (Citește mai mult) - MODERN STYLE
   ═══════════════════════════════════════════════════════════════════════════════ */

.btn-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  margin-top: var(--space-4);
}

.btn-expand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: inherit;
}

.btn-expand:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.3);
}

.btn-expand:hover::before {
  opacity: 1;
}

.btn-expand-text {
  position: relative;
  z-index: 1;
}

.btn-expand-icon {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.btn-expand:hover .btn-expand-icon {
  transform: translateY(2px);
}

.btn-expand[aria-expanded="true"] .btn-expand-icon {
  transform: rotate(180deg);
}

.btn-expand[aria-expanded="true"]:hover .btn-expand-icon {
  transform: rotate(180deg) translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CUSTOM DATEPICKER - DARK THEME
   ═══════════════════════════════════════════════════════════════════════════════ */

.custom-datepicker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(var(--color-bg-rgb), 0.8);
  padding: 1rem;
  z-index: 99999;
  pointer-events: auto;
}

.custom-datepicker[hidden] {
  display: none !important;
}

.custom-datepicker:not([hidden]) {
  display: block !important;
  animation: datepickerFadeIn 0.2s ease-out;
}

/* Pozitionare cu detectare de coliziune (aplicata din booking.js).
   Calendarul de check-out, ancorat cu left:0 de jumatatea lui de rand si lat
   de minim 300px, iesea din bara laterala si din viewport (P6). Cand JS-ul
   masoara ca nu incape, il ancoreaza la dreapta si/sau il deschide deasupra. */
.custom-datepicker.align-right {
  left: auto;
  right: 0;
}

.custom-datepicker.open-up {
  top: auto;
  bottom: calc(100% + 8px);
}

@keyframes datepickerFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Datepicker Header */
.datepicker-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.datepicker-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.datepicker-nav {
  display: flex;
  gap: 0.5rem;
}

.datepicker-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.datepicker-nav-btn:hover {
  background: var(--color-primary, #6366f1);
  border-color: var(--color-primary, #6366f1);
}

.datepicker-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* Datepicker Close Button - same size as nav buttons */
.datepicker-close-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
}

.datepicker-close-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Datepicker Grid */
.datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.5rem;
}

.datepicker-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.5rem 0;
}

.datepicker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.datepicker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.datepicker-day:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.2);
}

.datepicker-day.today {
  background: rgba(99, 102, 241, 0.3);
  font-weight: 700;
  position: relative;
}

.datepicker-day.today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--color-primary, #6366f1);
  border-radius: 50%;
}

.datepicker-day.selected {
  background: var(--color-primary, #6366f1);
  color: white;
  font-weight: 700;
}

/* Culori ca în legenda calendarului */
.datepicker-day.available {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.datepicker-day.available:hover {
  background: rgba(34, 197, 94, 0.3);
}

.datepicker-day.booked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  text-decoration: line-through;
  cursor: not-allowed;
}

.datepicker-day.other-month {
  color: #475569;
}

.datepicker-day.past {
  color: #475569;
  cursor: not-allowed;
  opacity: 0.5;
}

.datepicker-day:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Datepicker Footer */
.datepicker-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.datepicker-footer-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.datepicker-footer-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: white;
  border-color: rgba(99, 102, 241, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DATEPICKER MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .custom-datepicker {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100%;
    max-height: 75vh;
    border-radius: 24px 24px 0 0;
    padding: 1.5rem;
    padding-top: 4rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    z-index: 999999;
    animation: datepickerSlideUp 0.3s ease-out;
  }

  .custom-datepicker::before {
    content: 'Selectează data';
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
  }

  @keyframes datepickerSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* Close button for datepicker - mobile - same as nav buttons */
  .datepicker-close-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
  }

  .datepicker-close-btn:hover,
  .datepicker-close-btn:active {
    background: rgba(239, 68, 68, 0.3) !important;
  }

  .datepicker-day {
    min-width: 40px;
    min-height: 40px;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
  }

  .datepicker-nav-btn {
    width: 44px;
    height: 44px;
  }

  .datepicker-footer-btn {
    padding: 0.75rem 1.5rem;
    min-height: 44px;
  }
}

/* Desktop: hide close button, on mobile it's shown via media query above */

/* ═══════════════════════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Invitatia de instalare: cartonas in coltul din dreapta-jos, nu banda.
   Avea `left` SI `right` setate simultan, deci se intindea pe toata latimea
   ecranului — pe desktop iesea o bara de 2287px cu doua cuvinte in ea si un
   buton pierdut la celalalt capat. Acum are latime proprie si sta intr-un colt.
   Pe telefon ramane aproape pe toata latimea, unde chiar are sens. */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  right: var(--space-4);
  left: auto;
  width: min(380px, calc(100vw - 2 * var(--space-4)));
  z-index: var(--z-modal);
  display: none;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-elevated) 100%);
  border: 1px solid rgba(var(--color-primary-rgb), 0.55);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Pe ecrane mici: tot jos, dar pe latime, ca degetul sa ajunga usor. */
@media (max-width: 560px) {
  .pwa-install-banner {
    left: var(--space-3);
    right: var(--space-3);
    width: auto;
    bottom: 16px;
  }
}

.pwa-install-banner.show {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-3);
}

/* Butoanele trec pe randul de sub text, aliniate la dreapta: intr-un cartonas
   ingust nu mai incap pe acelasi rand fara sa striveasca descrierea. */
.pwa-install-banner.show .pwa-install-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.pwa-install-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.pwa-install-content {
  flex: 1;
  min-width: 0;
}

.pwa-install-title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-1) 0;
}

.pwa-install-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.pwa-install-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.pwa-install-btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

/* Butoanele cartonasului erau INVIZIBILE.
   `core/components.css` are o regula globala `.pwa-install-btn { display: none }`,
   scrisa pentru ALT component cu acelasi nume de clasa, si se incarca DUPA foaia
   aceasta — deci castiga ea. Rezultat masurat: ambele butoane cu display:none,
   latime si inaltime 0, intr-un card care le rezerva loc. Le readucem, dar doar
   in interiorul bannerului, ca sa nu atingem celalalt component. */
.pwa-install-banner .pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  /* `components.css` le da si `position: fixed` cu acelasi `bottom`/`right`,
     deci ambele butoane aterizau exact in acelasi punct si se suprapuneau
     peste titlu (masurat: containerul lor avea inaltime 0). Le readucem in
     fluxul cartonasului. */
  position: static;
  inset: auto;
}

.pwa-install-btn.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
}

.pwa-install-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.4);
}

.pwa-install-btn.secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.pwa-install-btn.secondary:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

@media (max-width: 480px) {
  .pwa-install-banner {
    bottom: 70px;
    left: var(--space-2);
    right: var(--space-2);
    flex-direction: column;
    text-align: center;
  }

  .pwa-install-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE-LEVEL AMBIENT EFFECTS - Showcase Theme (Rose/Pink)
   ═══════════════════════════════════════════════════════════════════════════════ */

.page-property::before {
  content: '';
  position: fixed;
  top: 15%;
  right: -200px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(236,72,153,0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: showcaseOrb1 24s ease-in-out infinite;
}

.page-property::after {
  content: '';
  position: fixed;
  bottom: -100px;
  left: -180px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244,114,182,0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  animation: showcaseOrb2 30s ease-in-out infinite;
}

@keyframes showcaseOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(-70px, 50px) scale(1.15); opacity: 1; }
}

@keyframes showcaseOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(60px, -40px) scale(1.2); opacity: 0.9; }
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes galleryReveal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


/* Explicatia care apare cand o luna nu are nicio zi selectabila. */
.datepicker-hint {
  margin: 8px 10px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(220, 180, 95, .12);
  border: 1px solid rgba(220, 180, 95, .35);
  color: var(--color-text, #e9edf6);
  font-size: 12.5px;
  line-height: 1.4;
}
