/* ============================================
   PHOTO PIPELINE STYLES
   Card heroes + enhanced photo modal viewer.
   Load AFTER components.css and dashboards.css
   so these rules override the simple placeholder.
   ============================================ */

/* -------- Card hero image -------- */
.property-card-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-100);
  overflow: hidden;
  display: block;
}

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

/* Fallback shown if the <img> fires onerror */
.property-card-hero-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--gray-500);
  font-size: 0.85rem;
  text-align: center;
  background: var(--gray-100);
}

.property-card-hero-failed .property-card-hero-fallback {
  display: flex;
}

/* Empty-state hero when there are no photos at all */
.property-card-hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--gray-500);
  font-size: 0.85rem;
  text-align: center;
  background: var(--gray-100);
}

.hero-fallback-icon {
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0.7;
}

/* -------- Modal: empty state with icon -------- */
.modal-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: var(--gray-500);
  font-size: 0.95rem;
  text-align: center;
  padding: 16px;
}

.modal-photo-empty-icon {
  font-size: 2.4rem;
  line-height: 1;
  opacity: 0.7;
}

.modal-photo-empty-text {
  font-size: 0.95rem;
}

/* Compact variant used under a link hero */
.modal-photo-empty-inline {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-align: center;
  padding: 8px 16px 0;
}

/* -------- Modal: link preview hero -------- */
.modal-photo-link-hero {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  background: var(--gray-100);
}

.modal-photo-link-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-photo-link-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.modal-photo-link-overlay-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.modal-photo-link-overlay-arrow {
  font-size: 0.9rem;
  line-height: 1;
}

.modal-photo-link-hero:hover .modal-photo-link-overlay {
  background: rgba(0, 0, 0, 0.85);
}

/* -------- Modal: extra link buttons row -------- */
.modal-photo-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--gray-50, #f9fafb);
  border-bottom: 1px solid var(--gray-200);
}

.modal-photo-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-800);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.modal-photo-link-btn:hover {
  background: var(--gray-50, #f9fafb);
  border-color: var(--gray-400);
}

.modal-photo-link-btn:active {
  transform: scale(0.98);
}

.modal-photo-link-btn-arrow {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* -------- Album-aware fallback (2026-06-07) --------
   When a thumbnail can't render but the property has an external photo
   album, the hero becomes a clickable "More pictures available" CTA
   instead of falsely claiming "No photos yet". Used on staff property
   cards + seller dashboard cards. */
.hero-fallback-album {
  cursor: pointer;
  text-decoration: none;
  color: var(--gray-600);
  transition: background .15s ease;
}
.hero-fallback-album:hover,
.hero-fallback-album:focus-visible {
  background: var(--surface-accent-soft, var(--blue-light));
  outline: none;
}
.hero-fallback-strong {
  font-weight: 700;
  color: var(--text-strong, var(--gray-800));
}
.hero-fallback-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  padding: 3px 12px;
  margin-top: 2px;
}
