/* ============================================
   AMBER VAULT AI — AI Audit Tool Styles
   ============================================ */

/* --- Audit Container --- */
.audit-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 500px;
}

/* --- Progress Bar --- */
.audit-progress {
  margin-bottom: 2.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber-light));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

/* --- Question Screen --- */
.audit-screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.audit-screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.audit-question {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.audit-question-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* --- Option Cards --- */
.audit-options {
  display: grid;
  gap: 0.75rem;
}

.audit-option {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  width: 100%;
}

.audit-option:hover {
  border-color: var(--amber);
  background: rgba(212, 135, 10, 0.05);
}

.audit-option.selected {
  border-color: var(--amber-light);
  background: rgba(212, 135, 10, 0.1);
  box-shadow: 0 0 0 1px var(--amber-light);
}

.audit-option-marker {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.audit-option.selected .audit-option-marker {
  border-color: var(--amber-light);
  background: var(--amber);
  color: var(--text-dark);
}

.audit-option-text {
  line-height: 1.5;
}

/* --- Navigation Buttons --- */
.audit-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.audit-nav .btn {
  min-width: 140px;
}

.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-back:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-next {
  background: var(--amber);
  color: var(--text-dark);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(212, 135, 10, 0.3);
}

.btn-next:hover {
  background: var(--amber-light);
  transform: translateY(-1px);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --- Email Gate Screen --- */
.email-gate {
  text-align: center;
  padding: 2rem 0;
}

.email-gate h2 {
  margin-bottom: 0.75rem;
}

.email-gate p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.email-gate-form {
  max-width: 400px;
  margin: 0 auto;
}

.email-gate-form input[type="text"],
.email-gate-form input[type="email"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-gate-form input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.email-gate-form input::placeholder {
  color: var(--text-muted);
}

.email-gate-form button {
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.email-gate-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* --- Results Screen --- */
.audit-results {
  text-align: center;
  padding: 1rem 0;
}

.audit-results h2 {
  margin-bottom: 0.5rem;
}

.results-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* Score Ring */
.score-ring-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
}

.score-ring-svg {
  transform: rotate(-90deg);
  width: 200px;
  height: 200px;
}

.score-ring-bg {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 12;
}

.score-ring-fill {
  fill: none;
  stroke: var(--amber-light);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 1.5s ease;
}

.score-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--amber-light);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.score-label-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Score interpretation */
.score-interpretation {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.score-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* Category Bars */
.category-scores {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.category-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.category-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.category-score-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber-light);
}

.category-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s ease;
  width: 0%;
}

.category-bar-fill.cat-operations {
  background: linear-gradient(90deg, #D4870A, #F5A623);
}

.category-bar-fill.cat-marketing {
  background: linear-gradient(90deg, #E8720C, #F5A623);
}

.category-bar-fill.cat-ai-readiness {
  background: linear-gradient(90deg, #8B5E0B, #D4870A);
}

/* Recommendations */
.audit-recommendations {
  text-align: left;
  margin-bottom: 2.5rem;
}

.audit-recommendations h3 {
  margin-bottom: 1rem;
  text-align: center;
}

.recommendation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}

.recommendation-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--amber-light);
}

.recommendation-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.recommendation-card a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Results CTA */
.results-cta {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
}

.results-cta h3 {
  margin-bottom: 0.5rem;
}

.results-cta p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.results-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Loading Spinner --- */
.audit-loading {
  text-align: center;
  padding: 3rem 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-surface);
  border-top-color: var(--amber-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.audit-loading p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Responsive --- */
@media (max-width: 700px) {
  .audit-container {
    padding: 1.5rem 1rem 2rem;
  }

  .audit-question {
    font-size: 1.15rem;
  }

  .audit-option {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }

  .score-ring-container {
    width: 160px;
    height: 160px;
  }

  .score-ring-svg {
    width: 160px;
    height: 160px;
  }

  .score-number {
    font-size: 2.25rem;
  }

  .audit-nav {
    flex-direction: column-reverse;
  }

  .audit-nav .btn,
  .audit-nav .btn-back,
  .audit-nav .btn-next {
    width: 100%;
    min-width: auto;
  }

  .results-cta-buttons {
    flex-direction: column;
  }
}
