:root {
  --spacing-sm: 5px;
  --spacing-md: 10px;
  --spacing-lg: 20px;
  --color-primary: #007BFF;
  --color-text-light: #fff;
  --color-header: green;
  --max-container-width: 1600px;
}

body {
  font-family: Arial, sans-serif;
  background: #f3f6fa;
  margin: 0;
  padding: var(--spacing-lg);
}

.lps-valuation-container,
.centered-container {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--max-container-width);
  margin: 0 auto !important;
  padding: 0 16px;
  position: relative;
}

.lps-logo,
.logo-container {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.lps-logo img,
.logo-container img {
  width: 100%;
  max-width: 500px;
  display: block;
  margin: 0 auto;
  height: auto;
}

.small-estimate-container {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  flex-direction: row;
}

.small-estimate {
  background: #000;
  color: #D4AF36;
  border-radius: 8px;
  padding: 6px 10px;
  flex: 1;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.small-estimate strong {
  font-weight: bold;
  font-size: 24px;
  margin-bottom: 4px;
  text-align: center;
}

.small-estimate span {
  font-size: 30px;
  font-weight: bold;
  white-space: nowrap;
  margin-top: 4px;
}

#valuation-summary {
  background: #fff;
  padding: var(--spacing-lg);
  border-radius: var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 20px;
  font-weight: bold;
  margin-bottom: var(--spacing-lg);
}

.valuation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.valuation-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin: var(--spacing-sm) 0;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  padding-left: 28px;
}

.valuation-list li::before {
  content: "📌";
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 18px;
  color: var(--color-primary);
}

.val-type::before         { content: "🏠"; }
.val-bedrooms::before     { content: "🛏️"; }
.val-bathrooms::before    { content: "🛁"; }
.val-living::before       { content: "📐"; }
.val-lot::before          { content: "🌳"; }
.val-year::before         { content: "📅"; }
.val-price::before        { content: "💲"; }
.val-ppsf::before         { content: "📏"; }
.val-estimate::before     { content: "📊"; }
.val-estppsf::before      { content: "💵"; }
.val-source::before       { content: "📈"; }

.valuation-list li strong {
  flex-shrink: 0;
  width: 200px;
  font-weight: bold;
  color: #333;
  text-align: left;
}

.valuation-list li span,
.valuation-list li a {
  flex-grow: 1;
  text-align: left;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  padding-left: 10px;
}

.section-title {
  font-size: 14px;
  margin: 30px 0 var(--spacing-md);
  font-weight: bold;
  color: var(--color-header);
}

.property-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.property-box,
.property-box-link {
  background: #fff;
  width: calc(33.333% - var(--spacing-lg));
  border-radius: var(--spacing-md);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.property-box:hover,
.property-box-link:hover {
  transform: translateY(-4px);
}

.property-box img {
  width: 100%;
  height: auto;
  min-height: 200px;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.property-info {
  padding: var(--spacing-md) 12px;
  flex-grow: 1;
}

.price {
  font-size: 18px;
  font-weight: bold;
  margin: var(--spacing-md) 0 var(--spacing-sm);
}

.features,
.address,
.attribution {
  font-size: 13px;
  color: #555;
  margin: 4px 0;
}

.view-property-btn {
  display: block;
  margin: 10px auto;
  padding: 8px 16px;
  background-color: #0073aa;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
}

.view-property-btn:hover {
  background-color: #005177;
}

.view-property-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.pin-label {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: green;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  z-index: 5;
}

.pin-label.sold {
  background: red;
}

.pin-label.active {
  background: green;
}

.lps-circle-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: white !important;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  margin: 0 !important;
  padding: 0 !important;
}

.lps-circle-subject,
.lps-circle-active {
  fill: green;
  stroke: #fff;
  stroke-width: 2;
}

.lps-circle-sold {
  fill: red;
  stroke: #fff;
  stroke-width: 2;
}

#map {
  width: 100%;
  height: 400px;
  margin: var(--spacing-lg) 0;
  border-radius: var(--spacing-md);
}

.error-message,
.loading-message {
  text-align: center;
  color: #555;
  font-size: 16px;
}

.disclaimer {
  text-align: center;
  margin-top: var(--spacing-lg);
  font-size: 16px;
}

.disclaimer p {
  margin: var(--spacing-sm) 0;
}

.rentals-section {
  margin-bottom: var(--spacing-lg);
}

/* Spinner styles */
.lps-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 4px solid rgba(0,0,0,0.6);
  border-top-color: #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1000;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .property-box, .property-box-link {
    width: 100%;
  }

  .logo-container img {
    max-width: 300px;
  }

  .small-estimate-container {
    flex-direction: column;
    align-items: center;
  }

  .small-estimate {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 600px) {
  .valuation-list li {
    flex-direction: column;
    padding-left: 0;
  }

  .valuation-list li::before {
    position: relative;
    margin-bottom: 4px;
    left: 0;
  }

  .valuation-list li strong,
  .valuation-list li span,
  .valuation-list li a {
    width: 100%;
    text-align: left;
  }
}