/**
 * Property Detail Page - Header Section Styles
 * 
 * Title and location section with improved spacing and typography
 * Uses modern fluid scaling with design tokens
 * 
 * Version: 2.0 (Modern CSS)
 * Updated: 2025-01-27
 */

/* ========================================================================
   PROPERTY HEADER SECTION
   ======================================================================== */

.property-header-section {
  padding-block: var(--section-spacing-sm);
  background-color: var(--property-bg);
  border-bottom: 1px solid var(--property-border);
}

.property-header {
  width: 100%;
}

/* ========================================================================
   TITLE WRAPPER
   ======================================================================== */

.property-title-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
}

.property-title-content {
  flex: 1;
  min-width: 0;
  /* Prevent overflow */
}

/* ========================================================================
   TITLE TYPOGRAPHY
   ======================================================================== */

.property-title {
  font-family: var(--font-family-heading, 'Playfair Display', serif);
  font-size: var(--font-title);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--font-title-line-height);
  color: var(--property-primary);
  margin: 0 0 var(--space-sm) 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ========================================================================
   LOCATION
   ======================================================================== */

.property-location {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--property-text-secondary);
  font-size: var(--font-body);
  margin: 0;
  font-family: var(--font-family-body, 'Poppins', sans-serif);
}

.property-location i {
  color: var(--property-accent);
  font-size: 1.1em;
  flex-shrink: 0;
  margin-top: 0.15em;
}

/* Location Details Container */
.location-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* City/Neighborhood - Primary location */
.location-city {
  font-weight: 600;
  color: var(--property-text);
  font-size: 1.05em;
}

/* Address - Secondary location info */
.location-address {
  font-size: 0.9em;
  color: var(--property-text-secondary);
  opacity: 0.85;
}

/* Fallback for old single-line format */
.property-location .location-text {
  max-width: 100%;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Allow wrapping on very small screens */
@media (max-width: 375px) {
  .property-location .location-text {
    white-space: normal;
    display: block;
  }

  .location-city {
    font-size: 1em;
  }

  .location-address {
    font-size: 0.85em;
  }
}

/* ========================================================================
   PROPERTY TYPE BADGE
   ======================================================================== */

.property-type-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--property-primary);
  color: var(--color-background, #ffffff);
  font-weight: var(--font-weight-semibold, 600);
  font-size: var(--font-small);
  border-radius: var(--card-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========================================================================
   RESPONSIVE ADJUSTMENTS
   ======================================================================== */

/* Tablet */
@media (max-width: 991px) {
  .property-title-wrapper {
    gap: var(--space-md);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .property-header-section {
    padding-block: var(--space-xl);
  }

  .property-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .property-title {
    font-size: clamp(1.5rem, 6vw + 0.5rem, 2.25rem);
  }

  .property-location {
    font-size: clamp(0.875rem, 2vw + 0.125rem, 1rem);
  }
}

/* Small mobile */
@media (max-width: 575px) {
  .property-header-section {
    padding-block: var(--space-lg);
  }

  .property-title {
    font-size: clamp(1.25rem, 5vw + 0.5rem, 2rem);
    margin-bottom: var(--space-xs);
  }

  .property-type-badge {
    padding: var(--space-xs) var(--space-sm);
    font-size: clamp(0.7rem, 1.5vw + 0.1rem, 0.875rem);
  }
}

/* ========================================================================
   DARK MODE STYLES
   ======================================================================== */

html[data-theme="dark"] .property-header-section {
  background-color: var(--property-bg);
  border-color: var(--property-border);
}

html[data-theme="dark"] .property-title {
  color: var(--property-text);
}

html[data-theme="dark"] .property-location {
  color: var(--property-text-secondary);
}

html[data-theme="dark"] .property-type-badge {
  background-color: var(--property-accent);
  color: var(--property-primary);
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
  .property-title {
    font-weight: 800;
  }

  .property-type-badge {
    border: 2px solid currentColor;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .property-header-section {
    transition: none;
  }
}