/* ============================================
   eComStrategics — Audit Tool Styles
   ============================================ */

/* --- Audit Hero --- */
.audit-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
  padding: 140px 0 80px;
}

.audit-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 194, 203, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 194, 203, 0.05) 0%, transparent 50%);
}

.audit-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.audit-hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.audit-hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.audit-hero-sub {
  font-size: 1.2rem;
  color: var(--gray-400);
  line-height: 1.8;
  margin-bottom: 40px;
}

.audit-input-group {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  gap: 12px;
}

.audit-input-group input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.audit-input-group input::placeholder {
  color: var(--gray-400);
}

.audit-input-group input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.audit-btn {
  white-space: nowrap;
  padding: 16px 36px !important;
}

.audit-hint {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 16px;
  opacity: 0.7;
}

/* --- Loading State --- */
.audit-loading {
  background: var(--navy);
  padding: 120px 0;
  text-align: center;
}

.loading-content {
  max-width: 400px;
  margin: 0 auto;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--teal);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}

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

.loading-domain {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.loading-check {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: opacity 0.3s ease;
}

/* --- Error State --- */
.audit-error {
  background: var(--navy);
  padding: 120px 0;
  text-align: center;
}

.error-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.error-card p {
  color: var(--gray-400);
  margin-bottom: 24px;
}

/* --- Results Section --- */
.audit-results {
  background: var(--navy);
  padding: 80px 0;
  min-height: 60vh;
}

.audit-results-header {
  text-align: center;
  margin-bottom: 48px;
}

.audit-results-header h2 {
  color: var(--white);
}

.audit-results-header h2 span {
  color: var(--teal);
}

/* --- Gauge Cards --- */
.gauges-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}

.gauge-card {
  background: var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}

.gauge-card:hover {
  border-color: rgba(0, 194, 203, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.gauge-card h3 {
  color: var(--white);
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.gauge-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.gauge-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.gauge-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1.5s ease-out, stroke 0.3s ease;
}

.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--white);
}

/* Score color classes */
.score-red { color: #ff4d4d; }
.score-yellow { color: #ffc107; }
.score-green { color: #22c55e; }
.ring-red { stroke: #ff4d4d !important; }
.ring-yellow { stroke: #ffc107 !important; }
.ring-green { stroke: #22c55e !important; }

/* --- Admin-only elements (hidden by default) --- */
.admin-only {
  display: none;
}

/* --- Summary Cards --- */
.summary-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 64px;
}

.summary-card {
  background: var(--navy-light);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.summary-card-header-static {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}

.summary-card-body-static {
  padding: 0 0 16px;
}

.summary-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px 16px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
}

.summary-card-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.summary-card-toggle-label {
  font-size: 0.85rem;
  color: var(--gray-400);
}

.summary-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-card-icon {
  font-size: 1.25rem;
}

.summary-card-title h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin: 0;
}

.summary-card-score {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-left: 8px;
}

.summary-card-toggle {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gray-400);
  transition: transform var(--transition);
  line-height: 1;
}

.summary-card.open .summary-card-toggle {
  transform: rotate(45deg);
}

.summary-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.summary-card.open .summary-card-body {
  max-height: 600px;
}

.summary-card-desc {
  padding: 0 32px;
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.check-list {
  list-style: none;
  padding: 0 32px 24px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: var(--gray-400);
}

.check-list li:last-child {
  border-bottom: none;
}

.check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.check-pass {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.check-fail {
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
}

/* --- Audit CTA --- */
.audit-cta {
  text-align: center;
  padding: 64px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.audit-cta h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.audit-cta > p {
  color: var(--gray-400);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.audit-cta-buttons {
  margin-bottom: 48px;
}

.audit-lead-capture {
  max-width: 480px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lead-capture-label {
  color: var(--gray-400);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.lead-form {
  display: flex;
  gap: 12px;
}

.lead-form input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.lead-form input::placeholder {
  color: var(--gray-400);
}

.lead-form input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.lead-form .btn {
  white-space: nowrap;
}

.lead-success {
  color: var(--teal);
  font-size: 0.9rem;
  margin-top: 12px;
}

.lead-error {
  color: #ff4d4d;
  font-size: 0.9rem;
  margin-top: 12px;
}

.lead-error a {
  color: #ff4d4d;
  text-decoration: underline;
}

.audit-cta-alt {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-top: 24px;
}

.audit-cta-alt a {
  color: var(--teal);
  text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .audit-hero {
    min-height: auto;
    padding: 140px 0 60px;
  }

  .audit-input-group {
    flex-direction: column;
  }

  .audit-input-group input,
  .audit-btn {
    width: 100%;
  }

  .gauges-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .summary-card-header {
    padding: 20px 20px;
  }

  .summary-card-desc {
    padding: 0 20px;
  }

  .check-list {
    padding: 0 20px 20px;
  }

  .lead-form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .gauge-wrap {
    width: 120px;
    height: 120px;
  }

  .gauge-value {
    font-size: 1.75rem;
  }
}
