/*
 * HealthEngine Theme — insurance.css
 * Loaded only on insurance pages via he_is_insurance_page()
 * Extends main.css with insurance-specific visual treatments
 */

/* Healthcare.gov external link treatment */
.he-page--insurance-company a[href*="healthcare.gov"],
.he-page--insurance-plan    a[href*="healthcare.gov"],
.he-page--insurance-hub     a[href*="healthcare.gov"] {
  color: var(--he-color-success);
  font-weight: var(--he-font-weight-medium);
}

/* Insurance company logo in hero */
.he-page__hero--insurance { padding-bottom: var(--he-space-8); }

/* Plan tier colour treatments — full card backgrounds on plan detail pages */
.he-page--insurance-plan.he-plan-tier-bronze { --page-accent: var(--he-tier-bronze); }
.he-page--insurance-plan.he-plan-tier-silver  { --page-accent: var(--he-tier-silver); }
.he-page--insurance-plan.he-plan-tier-gold    { --page-accent: var(--he-tier-gold); }
.he-page--insurance-plan.he-plan-tier-platinum{ --page-accent: var(--he-tier-platinum); }

/* Coverage hero badge — prominent on insurance company pages */
.he-page--insurance-company .he-page__hero {
  border-bottom: 3px solid var(--he-color-primary-light);
}

/* Insurance stat box */
.he-ins-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--he-space-4);
  margin-bottom: var(--he-space-6);
}

.he-ins-stat {
  text-align: center;
  padding: var(--he-space-4);
  background: var(--he-color-primary-light);
  border-radius: var(--he-radius);
}

.he-ins-stat__value {
  display: block;
  font-size: var(--he-text-2xl);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-primary);
}

.he-ins-stat__label {
  display: block;
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--he-space-1);
}

/* Premium range display */
.he-premium-range {
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
  padding: var(--he-space-4) var(--he-space-5);
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  margin-bottom: var(--he-space-4);
}

.he-premium-range__label {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
  flex-shrink: 0;
}

.he-premium-range__value {
  font-size: var(--he-text-xl);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text);
}

.he-premium-range__note {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  font-style: italic;
}

/* Coverage comparison table (for /insurance/covers/[condition]/ pages) */
.he-coverage-comparison {
  overflow-x: auto;
  margin-bottom: var(--he-space-8);
}

.he-coverage-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--he-text-sm);
}

.he-coverage-comparison th {
  background: var(--he-color-primary);
  color: #fff;
  padding: var(--he-space-3) var(--he-space-4);
  text-align: left;
  font-weight: var(--he-font-weight-medium);
}

.he-coverage-comparison td {
  padding: var(--he-space-3) var(--he-space-4);
  border-bottom: 1px solid var(--he-color-border-light);
}

.he-coverage-comparison tr:nth-child(even) td {
  background: var(--he-color-bg-alt);
}

/* State insurance grid */
.he-state-insurance-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--he-space-3);
  margin-bottom: var(--he-space-6);
}

.he-state-ins-card {
  padding: var(--he-space-4);
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  text-decoration: none;
  color: var(--he-color-text);
  font-size: var(--he-text-sm);
  text-align: center;
  transition: all var(--he-transition);
}

.he-state-ins-card:hover {
  border-color: var(--he-color-primary);
  background: var(--he-color-primary-light);
  color: var(--he-color-primary);
  text-decoration: none;
}

/* Insurance compliance notice — more prominent than general disclaimer */
.he-ins-compliance {
  display: flex;
  align-items: flex-start;
  gap: var(--he-space-4);
  padding: var(--he-space-5);
  background: #FEF9C3;
  border: 1px solid #FDE68A;
  border-radius: var(--he-radius);
  font-size: var(--he-text-sm);
  line-height: var(--he-line-height-base);
  margin-block: var(--he-space-6);
}

.he-ins-compliance__icon { font-size: var(--he-text-2xl); flex-shrink: 0; }

.he-ins-compliance__title {
  font-weight: var(--he-font-weight-bold);
  margin-bottom: var(--he-space-2);
}

/* Healthcare.gov CTA block — full width, high visual weight */
.he-healthcare-gov-cta {
  background: linear-gradient(135deg, #0057B8 0%, #003D82 100%);
  color: #fff;
  border-radius: var(--he-radius-lg);
  padding: var(--he-space-8);
  text-align: center;
  margin-block: var(--he-space-8);
}

.he-healthcare-gov-cta__title {
  font-size: var(--he-text-2xl);
  color: #fff;
  margin-bottom: var(--he-space-3);
}

.he-healthcare-gov-cta__desc {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--he-space-6);
}

.he-healthcare-gov-cta .he-btn {
  background: #fff;
  color: var(--he-color-primary);
  font-size: var(--he-text-md);
  padding: var(--he-space-4) var(--he-space-8);
}

.he-healthcare-gov-cta .he-btn:hover {
  background: #F0F7FF;
  text-decoration: none;
  color: var(--he-color-primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .he-ins-stats           { grid-template-columns: repeat(2, 1fr); }
  .he-state-insurance-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .he-ins-stats           { grid-template-columns: 1fr 1fr; }
  .he-state-insurance-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* Dark mode insurance overrides */
@media (prefers-color-scheme: dark) {
  .he-ins-compliance { background: rgba(253,230,138,0.1); border-color: rgba(253,230,138,0.2); color: var(--he-color-text); }
  .he-ins-stat       { background: rgba(0,87,184,0.2); }
}
