/* Scoped styles for Hail Damage History Checker */
.hdhc-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.hdhc-main {
  padding: 1.5rem 1rem 3rem;
}

.hdhc-container {
  max-width: 1020px;
  margin: 0 auto;
}

.hdhc-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hdhc-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.hdhc-desc {
  font-size: 1.05rem;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
}

/* Search Card */
.hdhc-search-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hdhc-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: flex-end;
}

.hdhc-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hdhc-field-btn {
  display: flex;
}

.hdhc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.hdhc-select, .hdhc-input {
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.hdhc-select:focus, .hdhc-input:focus {
  border-color: #0284c7;
}

.hdhc-btn {
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hdhc-btn-primary {
  background: #0284c7;
  color: #ffffff;
}

.hdhc-btn-primary:hover {
  background: #0369a1;
}

/* Results Section */
.hdhc-results-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hdhc-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hdhc-head-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hdhc-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.hdhc-risk-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.hdhc-risk-high {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.hdhc-risk-mod {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.hdhc-count-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

/* Metrics Grid */
.hdhc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hdhc-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hdhc-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.hdhc-metric-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.hdhc-metric-sub {
  font-size: 0.8rem;
  color: #475569;
}

/* Table */
.hdhc-table-wrap {
  overflow-x: auto;
}

.hdhc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.hdhc-table th {
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  border-bottom: 2px solid #e2e8f0;
}

.hdhc-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.hdhc-size-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.hdhc-size-severe {
  background: #fee2e2;
  color: #b91c1c;
}

.hdhc-size-mod {
  background: #fef3c7;
  color: #b45309;
}

/* Calculator */
.hdhc-calc-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.hdhc-calc-desc {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

.hdhc-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.hdhc-calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hdhc-calc-output {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hdhc-out-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #475569;
}

.hdhc-out-label {
  font-size: 0.9rem;
  color: #475569;
}

.hdhc-out-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.hdhc-out-net {
  border-top: 2px solid #cbd5e1;
  padding-top: 0.75rem;
  color: #0f172a;
  font-weight: 700;
}

.hdhc-out-net .hdhc-out-val {
  color: #10b981;
  font-size: 1.35rem;
}

/* Checklist */
.hdhc-checklist-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.hdhc-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hdhc-check-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  position: relative;
}

.hdhc-check-num {
  width: 24px;
  height: 24px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hdhc-check-head {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.hdhc-check-p {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

/* Ad slots */
.hdhc-ad-slot {
  margin: 1.75rem 0;
  min-height: 280px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .hdhc-search-grid {
    grid-template-columns: 1fr;
  }
  .hdhc-calc-grid {
    grid-template-columns: 1fr;
  }
}
