/* Scoped styling for email-reputation-checker */
.erc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text, #1e293b);
}

.erc-header {
  margin-bottom: 1.5rem;
}

.erc-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: #ede9fe;
  color: #6d28d9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.erc-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--color-heading, #0f172a);
}

.erc-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
}

/* Ad slots */
/* removed dead erc-ad-slot */ {
  margin: 1.5rem 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-subtle, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 0.5rem;
}

/* Main Grid */
.erc-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 960px) {
  .erc-main-grid {
    grid-template-columns: 5fr 7fr;
  }
}

/* Cards */
.erc-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.erc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding-bottom: 0.75rem;
}

.erc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-heading, #0f172a);
}

.erc-sub-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem 0;
  color: #0f172a;
}

.erc-badge-meta {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  color: #475569;
  font-weight: 600;
}

/* Sample Bar */
.erc-sample-bar {
  margin-bottom: 1.25rem;
}

.erc-sample-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.erc-sample-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.erc-btn-sample {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.erc-btn-sample:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Form */
.erc-form-group {
  margin-bottom: 1.25rem;
}

.erc-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.erc-input-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.erc-input {
  flex: 1;
  min-width: 220px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  outline: none;
}

.erc-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.erc-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.erc-btn-primary:hover {
  background: #1d4ed8;
}

/* DNS Box */
.erc-dns-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.erc-dns-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.erc-dns-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #1e293b;
}

.erc-dns-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
}

.erc-dns-ok { background: #dcfce7; color: #15803d; }
.erc-dns-warn { background: #fef9c3; color: #a16207; }
.erc-dns-err { background: #fee2e2; color: #b91c1c; }

.erc-dns-details {
  margin: 0;
  font-size: 0.775rem;
  color: #64748b;
  line-height: 1.4;
}

.erc-dns-details code {
  background: #f1f5f9;
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
  color: #0f172a;
}

/* Tips list */
.erc-tips-wrap {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.erc-tips-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.erc-tips-list strong {
  color: #334155;
}

/* Score Banner */
.erc-score-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}

.erc-score-circle {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.erc-score-high { background: #ecfdf5; border: 1px solid #a7f3d0; }
.erc-score-high .erc-score-circle { background: #059669; }
.erc-score-high .erc-score-headline { color: #065f46; }

.erc-score-mod { background: #eff6ff; border: 1px solid #bfdbfe; }
.erc-score-mod .erc-score-circle { background: #2563eb; }
.erc-score-mod .erc-score-headline { color: #1e40af; }

.erc-score-low { background: #fffbeb; border: 1px solid #fde68a; }
.erc-score-low .erc-score-circle { background: #d97706; }
.erc-score-low .erc-score-headline { color: #92400e; }

.erc-score-risk { background: #fef2f2; border: 1px solid #fecaca; }
.erc-score-risk .erc-score-circle { background: #dc2626; }
.erc-score-risk .erc-score-headline { color: #991b1b; }

.erc-score-info {
  flex: 1;
}

.erc-score-headline {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.erc-score-rating {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.35rem;
}

.erc-score-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #334155;
}

/* Pills */
.erc-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.erc-pill-safe { background: #d1fae5; color: #065f46; }
.erc-pill-mod { background: #dbeafe; color: #1e40af; }
.erc-pill-warn { background: #fef3c7; color: #92400e; }
.erc-pill-risk { background: #fee2e2; color: #991b1b; }

/* Diagnostics list */
.erc-diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.erc-diag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.erc-diag-pass { border-left: 4px solid #10b981; }
.erc-diag-warn { border-left: 4px solid #f59e0b; }
.erc-diag-fail { border-left: 4px solid #ef4444; }

.erc-diag-left {
  flex: 1;
  padding-right: 0.75rem;
}

.erc-diag-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.erc-diag-desc {
  display: block;
  font-size: 0.785rem;
  color: #64748b;
  line-height: 1.35;
}

.erc-diag-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.erc-pill-pass { background: #dcfce7; color: #15803d; }
.erc-pill-warn { background: #fef9c3; color: #a16207; }
.erc-pill-fail { background: #fee2e2; color: #b91c1c; }

.erc-input-section {
  position: relative;
}

.erc-results-section {
  position: relative;
}

/* Animated button and progress loaders */
.erc-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: erc-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes erc-spin {
  to { transform: rotate(360deg); }
}

.erc-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--tf-ink, #0f172a);
}

.erc-loading-card .erc-btn-spinner {
  border-color: var(--tf-rule, #cbd5e1);
  border-top-color: var(--tf-accent, #0284c7);
}
