:root {
  --property-preview-chip-bg: #f1f5f9;
  --property-preview-chip-color: var(--gf-color-neutral-700);
  --property-preview-chip-primary-bg: rgba(var(--gf-color-primary-rgb), 0.12);
  --property-preview-chip-primary-color: var(--gf-color-primary);
}

/* Import property detail map component styles */
@import url('../components/property_detail_map.css');

.property-preview-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.property-preview-card {
  border-radius: var(--gf-card-radius, 1.25rem);
}

.property-preview-info-panel {
  background-color: transparent;
  padding: 0;
}

.property-preview-payment-row .property-preview-info-panel {
  height: 100%;
}

.property-preview-status {
  letter-spacing: 0.04em;
}

.property-preview-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
  text-align: right;
  max-width: 100%;
  min-width: 0;
}

.property-preview-updated__text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.property-preview-title[data-property-title-fit] {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

@media (max-width: 768px) {
  .property-preview-title[data-property-title-fit] {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }
}

.property-preview-label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gf-color-neutral-500);
  margin-bottom: 0.35rem;
}

.property-preview-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gf-color-neutral-900);
}

.property-preview-subvalue {
  font-size: 0.85rem;
  color: var(--gf-color-neutral-500);
}

.property-preview-chip,
.property-preview-chip--primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: var(--property-preview-chip-bg);
  color: var(--property-preview-chip-color);
}

.property-preview-chip--primary {
  background-color: var(--property-preview-chip-primary-bg);
  color: var(--property-preview-chip-primary-color);
}

.property-preview-chip-group,
.property-preview-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.property-preview-chip-group--compact {
  gap: 0.35rem;
}

.property-preview-chip--small {
  padding: 0.25rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.property-preview-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.property-preview-media-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background-color: #f8fafc;
  min-height: 220px;
  cursor: pointer;
}

.property-preview-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-preview-media-item:hover img {
  transform: scale(1.03);
}

/* Video-specific styles */
.property-preview-media-item--video {
  cursor: pointer;
  min-height: 300px;
  grid-column: 1 / -1; /* Always span full width */
}

.property-preview-media-item--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.1rem;
  pointer-events: none; /* Prevent video controls from interfering with click to open slideshow */
}

/* Responsive adjustments for video */
@media (max-width: 768px) {
  .property-preview-media-item--video {
    min-height: 250px;
  }
}

.property-preview-media-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-color: rgba(var(--gf-color-primary-rgb), 0.92);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.property-preview-media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.7) 100%);
  color: #ffffff;
  font-size: 0.875rem;
}

.property-preview-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 240px;
  border-radius: 1.1rem;
  border: 1px dashed var(--gf-color-neutral-200);
  background-color: #f8fafc;
}

.property-preview-price {
  line-height: 1.1;
}

.property-preview-note {
  color: var(--gf-color-neutral-600, #4b5563);
}

.property-preview-feature-icon {
  background-color: rgba(var(--gf-color-primary-rgb), 0.08);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.property-preview-map {
  border-radius: 1.1rem;
  border: 1px dashed var(--gf-color-neutral-200);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(87, 166, 96, 0.08), rgba(30, 64, 175, 0.05));
}

.property-preview-map-visual {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.property-preview-avatar {
  background: linear-gradient(135deg, rgba(87, 166, 96, 0.08), rgba(30, 64, 175, 0.05));
  height: 56px;
  width: 56px;
  min-width: 56px;
  flex: 0 0 56px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(15, 23, 42, 0.08);
  background-color: rgba(var(--gf-color-primary-rgb), 0.12);
  color: var(--gf-color-primary);
  font-weight: 700;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.property-preview-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.property-preview-contact-list li {
  list-style: none;
  font-size: 0.95rem;
}

.property-preview-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.05),
    rgba(15, 23, 42, 0.25),
    rgba(15, 23, 42, 0.05)
  );
}

.property-preview-sidebar .btn {
  font-weight: 600;
}

.property-preview-contact-form .btn[disabled],
.property-preview-contact-form .btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.property-preview-contact-form .form-check-input:disabled {
  background-color: #e2e8f0;
}

.property-preview-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--gf-color-neutral-600);
}

.property-preview-contact-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.4;
}

.property-preview-contact-meta__item i {
  font-size: 1.125rem;
}

.property-preview-contact-meta__item--label {
  background-color: rgba(var(--gf-color-primary-rgb), 0.15);
  color: var(--gf-color-primary);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
}

.destination-entry__text[data-contact-fit-text] {
  white-space: nowrap;
}

.property-preview-sidebar {
  position: relative;
}

.property-preview-sidebar__track {
  position: relative;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.property-preview-sidebar__track--scrollable {
  overflow-y: auto;
  padding-right: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.property-preview-sidebar__track--scrollable::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.property-preview-media-item:focus-visible {
  outline: 3px solid rgba(var(--gf-color-primary-rgb), 0.45);
  outline-offset: 4px;
}

body.property-preview-slideshow-open {
  overflow: hidden;
}

.property-preview-slideshow {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(8, 15, 31, 0.92);
  backdrop-filter: blur(2px);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 4rem) clamp(3.5rem, 6vh, 5rem);
  gap: clamp(1.25rem, 3vw, 2rem);
  z-index: 1080;
}

.property-preview-slideshow[hidden] {
  display: none;
}

.property-preview-slideshow__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(1200px, 90vw);
  max-height: calc(100vh - 220px);
  z-index: 1;
}

.property-preview-slideshow__picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-preview-slideshow__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 90vw);
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  will-change: transform;
}

/* Video in slideshow */
.property-preview-slideshow__stage video[data-slideshow-video] {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 90vw);
  max-height: calc(100vh - 220px);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background-color: #000;
}

.property-preview-slideshow__stage[data-transition='next'] .property-preview-slideshow__image {
  animation: property-preview-slideshow-slide-next 0.45s ease both;
}

.property-preview-slideshow__stage[data-transition='prev'] .property-preview-slideshow__image {
  animation: property-preview-slideshow-slide-prev 0.45s ease both;
}

.property-preview-slideshow__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.24s ease, background-color 0.24s ease;
  z-index: 3;
}

.property-preview-slideshow__nav .material-icons-outlined {
  font-size: 2.125rem;
}

.property-preview-slideshow__nav--prev {
  left: clamp(1rem, 5vw, 3.5rem);
}

.property-preview-slideshow__nav--next {
  right: clamp(1rem, 5vw, 3.5rem);
}

.property-preview-slideshow__nav:hover,
.property-preview-slideshow__nav:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.08);
  outline: none;
}

.property-preview-slideshow__close {
  position: fixed;
  top: clamp(1rem, 4vw, 2.5rem);
  right: clamp(1rem, 4vw, 2.5rem);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.24s ease, background-color 0.24s ease;
  z-index: 3;
}

.property-preview-slideshow__close:hover,
.property-preview-slideshow__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  outline: none;
}

.property-preview-slideshow__thumbnails {
  position: fixed;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  max-width: min(90vw, 960px);
  overflow-x: auto;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 1rem;
  z-index: 2;
}

.property-preview-slideshow__thumbnails::-webkit-scrollbar {
  height: 6px;
}

.property-preview-slideshow__thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.property-preview-slideshow__thumb {
  border: 0;
  padding: 0;
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.property-preview-slideshow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video thumbnail styling */
.property-preview-slideshow__thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(87, 166, 96, 0.25), rgba(30, 64, 175, 0.25));
  position: relative;
}

.property-preview-slideshow__thumb-video .material-icons-outlined {
  font-size: 2rem;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.property-preview-slideshow__thumb:hover,
.property-preview-slideshow__thumb:focus-visible {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.property-preview-slideshow__thumb.is-active {
  border-color: var(--gf-color-primary, #22c55e);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

@keyframes property-preview-slideshow-slide-next {
  0% {
    transform: translate3d(6%, 0, 0) scale(0.995);
    opacity: 0;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes property-preview-slideshow-slide-prev {
  0% {
    transform: translate3d(-6%, 0, 0) scale(0.995);
    opacity: 0;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .property-preview-slideshow__stage[data-transition] .property-preview-slideshow__image {
    animation: none;
  }
}

@media (max-width: 991.98px) {
  .property-preview-sidebar__track {
    transform: none !important;
  }
}

@media (min-width: 992px) {
  .property-preview-media-item.is-featured {
    grid-column: span 2;
    min-height: 320px;
  }
}

@media (max-width: 575.98px) {
  .property-preview-media-item {
    min-height: 180px;
  }

  .property-preview-slideshow {
    padding-bottom: clamp(2.75rem, 9vh, 4.5rem);
  }

  .property-preview-slideshow__nav {
    width: 48px;
    height: 48px;
  }

  .property-preview-slideshow__thumb {
    width: 56px;
    height: 56px;
  }
}
