/* ============================================
   HURD SOLUTIONS — AUDIT CORE STYLES
   (Free, Mini, Full + Payment Success)
   ============================================ */

/* --- 1. Base + Layout --- */

:root {
  --success-green: #2ecc71;
  --warn-yellow: #f1c40f;
  --error-red: #e74c3c;
}

.audit-section,
.payment-success {
  background: var(--color-bg);
  padding: 4rem 1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* --- 2. Audit Form (Free + Mini) --- */

.free-audit,
.mini-audit-form {
  text-align: center;
  background: var(--color-bg);
  padding: 4rem 1rem;
}

.free-audit h1,
.mini-audit-form h2 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.free-audit .intro,
.mini-audit-form .intro {
  color: var(--color-muted);
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.audit-card {
  background: var(--color-panel);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 2rem 2.5rem;
  text-align: left;
  position: relative;
  margin: 0 auto 2rem;
  border-top: 5px solid var(--color-accent);
  animation: fadeSlideIn 0.7s ease;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 600;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--color-panel);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}

/* --- 3. Audit Results Cards --- */

.audit-results {
  background: var(--color-white);
  padding: 5rem 1rem;
}

.results-wrapper {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.audit-results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.audit-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-left: 6px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audit-card.good { border-left-color: var(--success-green); }
.audit-card.warn { border-left-color: var(--warn-yellow); }
.audit-card.bad  { border-left-color: var(--error-red); }

.audit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.audit-info { flex: 1; }

.audit-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
}

.audit-score-line {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0.4rem 0 0.6rem;
}

.audit-notes {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.5;
}

.score-square {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.score-square.good { background: var(--success-green); }
.score-square.warn { background: var(--warn-yellow); color: #222; }
.score-square.bad  { background: var(--error-red); }

/* --- 4. Payment Success --- */

.payment-success {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-white) 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 1rem;
}

.payment-success .container {
  max-width: 720px;
  width: 100%;
}

.success-wrapper {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 3rem 2.5rem 4rem;
  text-align: center;
  animation: fadeSlideIn 0.7s ease-out;
}

.success-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.4rem;
  font-weight: bold;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.payment-success h1 {
  color: var(--color-primary);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.4rem;
}

.payment-success .subtitle {
  color: var(--color-text);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.success-body {
  color: var(--color-text);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

.next-steps {
  background: var(--color-panel);
  border-radius: 0.75rem;
  padding: 1.8rem 1.5rem;
  text-align: left;
  margin: 2rem auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.next-steps h2 {
  color: var(--color-accent);
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.next-steps ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.next-steps li {
  margin: 0.75rem 0;
  font-size: 1rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

/* --- 5. Audit Context Section --- */

.audit-context-section {
  margin-top: 4rem;
  background: #f9f9f9;
  padding: 2rem 1rem;
  border-top: 2px solid var(--color-primary);
}

.audit-context-section .container {
  max-width: 800px;
  margin: 0 auto;
}

.context-summary,
.audit-context-form {
  background: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  margin-top: 1rem;
}

.success-banner {
  background: #e8f8f3;
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-banner .check {
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

#editContextBtn {
  margin-top: 0.75rem;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: #fff;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#editContextBtn:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- 6. Animations --- */

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(25px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- 7. Responsive Tweaks --- */

@media (max-width: 768px) {
  .audit-card {
    flex-direction: column;
    align-items: stretch;
  }

  .score-square {
    width: 60px;
    height: 60px;
    font-size: 1.1rem;
    align-self: flex-end;
  }

  .results-wrapper {
    padding: 2rem 1.25rem;
  }

  .success-wrapper {
    padding: 2rem 1.5rem 3rem;
  }

  .next-steps {
    padding: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
  }

  .free-audit h1,
  .payment-success h1 {
    font-size: 1.8rem;
  }

  .next-steps li {
    font-size: 0.95rem;
  }
}

/* ============================================
   MODULE: FREE AUDIT LANDING FORM
   ============================================ */

.free-audit {
  background: var(--color-bg);
  padding: var(--section-space, 4rem) 1rem;
  text-align: center;
}

.free-audit h1 {
  color: var(--color-primary);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.free-audit .intro {
  color: var(--color-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* --- Card wrapper --- */
.audit-card {
  background: var(--color-panel);
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 2rem 2.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--color-accent);
  animation: fadeSlideIn 0.7s ease;
}

.audit-card form {
  position: relative;
  z-index: 1;
}

/* --- Form fields --- */
.audit-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--color-panel);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* --- Note + quota message --- */
.audit-limit-warning {
  background: var(--color-white);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-top: 2rem;
  text-align: left;
  max-width: 600px;
  margin-inline: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ============================================
   MODULE: FREE AUDIT OVERLAY + SUCCESS ANIMATION
   ============================================ */

.audit-progress {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.audit-progress.hidden {
  display: none;
}

.progress-box {
  text-align: center;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem 3rem;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--color-accent);
  position: relative;
  width: 300px;
}

.spinner {
  border: 4px solid var(--color-panel);
  border-top: 4px solid var(--color-accent);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Success Tick --- */
.success-tick {
  display: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--success-green);
  margin: 0 auto 1rem;
  position: relative;
  box-shadow: 0 0 0 5px rgba(46, 204, 113, 0.1);
  animation: popIn 0.5s ease forwards;
}

.success-tick::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 38px;
  width: 20px;
  height: 40px;
  border-right: 4px solid var(--success-green);
  border-bottom: 4px solid var(--success-green);
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  animation: drawTick 0.4s ease-out 0.4s forwards;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes drawTick {
  to { transform: rotate(45deg) scale(1); }
}

.progress-box.success .spinner {
  display: none;
}

.progress-box.success .success-tick {
  display: block;
}

.progress-box.success p {
  color: var(--success-green);
  font-weight: 600;
  margin-top: 1rem;
}

/* --- Mobile tweaks --- */
@media (max-width: 600px) {
  .audit-card {
    padding: 1.5rem;
  }
  .progress-box {
    padding: 1.5rem 2rem;
  }
}

