/* Property Analytics Widget Styles */

.analytics-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}

.analytics-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.analytics-header {
  margin-bottom: 1rem;
}

.analytics-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f1f1f;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.analytics-content {
  color: #4b5563;
}

/* Price Badge */
.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-icon {
  font-size: 1.3rem;
}

.badge-text {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analytics-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6b7280;
  margin: 0 0 1.25rem 0;
}

.analytics-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f1f1f;
}

/* Market Grid */
.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.market-stat {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.market-label {
  font-size: 0.8rem;
  color: #166534;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.market-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f4c3a;
}

.market-value-small {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f4c3a;
}

/* Investment Analysis */
.investment-grade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 10px;
  color: white;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.grade-letter {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.grade-label {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.investment-metrics {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-row.benchmark {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  margin: 0.5rem -1rem -1rem -1rem;
  padding: 1rem;
  border-radius: 0 0 8px 8px;
  border-bottom: none;
}

.metric-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 600;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f1f1f;
}

/* Location Grade */
.location-grade {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #0f4c3a;
  border-radius: 12px;
}

.grade-emoji {
  font-size: 4rem;
  line-height: 1;
}

.grade-info {
  flex: 1;
}

.grade-letter-large {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f4c3a;
  margin-bottom: 0.25rem;
}

.grade-description {
  font-size: 0.95rem;
  color: #166534;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.grade-yield {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #0f4c3a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Disclaimer */
.analytics-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #d1d5db;
}

/* Empty State */
.analytics-empty {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .analytics-stats,
  .market-grid {
    grid-template-columns: 1fr;
  }
  
  .location-grade {
    flex-direction: column;
    text-align: center;
  }
  
  .investment-grade {
    flex-direction: column;
    text-align: center;
  }
  
  .grade-letter {
    font-size: 2.5rem;
  }
}
