/**
 * Marketing Audit Questionnaire Styles
 * Coffee Marketing Digital
 *
 * Form-specific styles only. Global variables and resets are in main.css.
 * Page structure (header, footer, container) handled by main.css.
 */

/* ============================================
   Audit Page Layout
   ============================================ */
.audit-page__wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ============================================
   Hero Section
   ============================================ */
.audit-hero {
  text-align: center;
  margin-bottom: 48px;
}

.audit-hero h1 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #4c4c4c;
  margin-bottom: 16px;
  line-height: 1.3;
}

.audit-hero__subtitle {
  font-size: 1.1rem;
  color: #494949;
  max-width: 600px;
  margin: 0 auto 8px;
}

.audit-hero__time {
  font-size: 0.875rem;
  color: #666666;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-wrapper {
  margin-bottom: 32px;
}

.progress-bar {
  height: 6px;
  background: #f2f2f2;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: #e09900;
  width: 12.5%;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.progress-steps .step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.progress-steps .step.active {
  background: #e09900;
  color: #ffffff;
}

.progress-steps .step.completed {
  background: #d35a00;
  color: #ffffff;
}

.progress-labels {
  display: none;
}

@media (min-width: 768px) {
  .progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666666;
  }

  .progress-labels span {
    text-align: center;
    width: 60px;
  }
}

/* ============================================
   Form Container
   ============================================ */
#audit-form {
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 32px;
}

@media (max-width: 480px) {
  #audit-form {
    padding: 24px;
    margin: 0 -16px;
    border-radius: 0;
  }
}

/* ============================================
   Form Sections
   ============================================ */
.form-section {
  display: none;
}

.form-section.active {
  display: block;
  animation: auditFadeIn 0.3s ease;
}

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

.form-section h2 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #4c4c4c;
  margin-bottom: 8px;
}

.section-intro {
  color: #666666;
  margin-bottom: 24px;
}

/* ============================================
   Form Groups
   ============================================ */
.form-group {
  margin-bottom: 24px;
}

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

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   Labels
   ============================================ */
.form-label {
  display: block;
  font-weight: 600;
  color: #4c4c4c;
  margin-bottom: 8px;
}

.required {
  color: #c0392b;
}

.form-help {
  display: block;
  font-size: 0.8125rem;
  color: #666666;
  margin-top: 4px;
}

/* ============================================
   Inputs & Selects
   ============================================ */
.form-input {
  width: 100%;
  padding: 12px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  color: #494949;
  background: #ffffff;
  border: 1px solid #bbbbbb;
  border-radius: 3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #e09900;
  box-shadow: 0 0 0 2px rgba(224, 153, 0, 0.15);
}

.form-input::placeholder {
  color: #bbbbbb;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234c4c4c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============================================
   Radio & Checkbox Groups
   ============================================ */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid #f2f2f2;
  border-radius: 3px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radio-label:hover,
.checkbox-label:hover {
  border-color: #edb059;
  background-color: rgba(224, 153, 0, 0.03);
}

.radio-label input,
.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #e09900;
}

.radio-label span,
.checkbox-label span {
  flex: 1;
}

/* Consent checkbox - different styling */
.consent-group .checkbox-label {
  border: none;
  padding: 0;
  background: none;
}

.consent-group .checkbox-label:hover {
  border: none;
  background: none;
}

.consent-group a {
  color: #e09900;
  text-decoration: none;
}

.consent-group a:hover {
  text-decoration: underline;
}

/* ============================================
   Conditional Fields
   ============================================ */
.conditional {
  display: none;
}

.conditional.visible {
  display: block;
  animation: auditFadeIn 0.3s ease;
}

/* ============================================
   Error States
   ============================================ */
.form-error {
  display: none;
  color: #c0392b;
  font-size: 0.8125rem;
  margin-top: 4px;
}

.form-group.error .form-input {
  border-color: #c0392b;
}

.form-group.error .form-error {
  display: block;
}

/* ============================================
   Honeypot (Hidden)
   ============================================ */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   Navigation Buttons
   ============================================ */
.form-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f2f2f2;
}

.form-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.6em 1.5em;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.form-nav .btn-prev {
  background: #ffffff;
  color: #494949;
  border-color: #bbbbbb;
}

.form-nav .btn-prev:hover {
  border-color: #4c4c4c;
  color: #4c4c4c;
}

.form-nav .btn-next,
.form-nav .btn-submit {
  background: #e09900;
  color: #ffffff;
  border-color: #e09900;
}

.form-nav .btn-next:hover,
.form-nav .btn-submit:hover {
  background: #d35a00;
  border-color: #d35a00;
}

.form-nav .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading state */
.form-nav .btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.form-nav .btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: auditSpin 0.6s linear infinite;
}

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

/* ============================================
   Audit Value Proposition (Section 8)
   ============================================ */
.audit-value-prop {
  background: #f9f9f9;
  border: 1px solid #f2f2f2;
  border-radius: 3px;
  padding: 24px;
  margin-bottom: 32px;
}

.audit-value-prop h3 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #4c4c4c;
  margin-bottom: 8px;
}

.audit-value-prop > p {
  margin-bottom: 16px;
  color: #494949;
}

.audit-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.audit-benefits li {
  position: relative;
  padding: 8px 0 8px 24px;
  border-bottom: 1px solid #f2f2f2;
  line-height: 1.6;
}

.audit-benefits li:last-child {
  border-bottom: none;
}

.audit-benefits li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #e09900;
  font-weight: 700;
  font-size: 1.1rem;
}

.audit-benefits li strong {
  color: #4c4c4c;
}

.audit-delivery {
  font-size: 0.9rem;
  color: #666666;
  font-style: italic;
  margin-bottom: 0;
}

/* ============================================
   Email Verification Step
   ============================================ */
.verification-step {
  text-align: center;
  padding: 32px 16px;
  margin-top: 24px;
  border-top: 1px solid #f2f2f2;
}

.verification-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.verification-step h3 {
  font-family: 'Poppins', Arial, sans-serif;
  color: #4c4c4c;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.verification-message {
  color: #494949;
  margin-bottom: 24px;
  line-height: 1.6;
}

.verification-code-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.verification-code-input {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5em;
  padding: 0.5em 0.75em 0.5em 1.25em;
  border: 2px solid #bbbbbb;
  border-radius: 3px;
  width: 220px;
  max-width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}

.verification-code-input:focus {
  border-color: #e09900;
}

.verification-code-input.error {
  border-color: #c0392b;
}

.verification-code-input.success {
  border-color: #27ae60;
}

.btn-verify {
  background: #e09900;
  color: #ffffff;
  border-color: #e09900;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.6em 2em;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.btn-verify:hover {
  background: #d35a00;
  border-color: #d35a00;
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-verify.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-verify.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: auditSpin 0.6s linear infinite;
}

.verification-status {
  margin-bottom: 16px;
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 0.9rem;
  display: none;
}

.verification-status.visible {
  display: block;
}

.verification-status.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.verification-status.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.verification-status.loading {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

.verification-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.btn-link {
  background: none;
  border: none;
  color: #e09900;
  cursor: pointer;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: #d35a00;
}

.btn-link:disabled {
  color: #666666;
  cursor: not-allowed;
  text-decoration: none;
}

.action-separator {
  color: #666666;
}

#resend-countdown {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Form Status Messages
   ============================================ */
.form-status {
  display: none;
  padding: 16px;
  border-radius: 3px;
  margin-top: 24px;
  text-align: center;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: #fff3cd;
  border: 1px solid #e09900;
  color: #4c4c4c;
}

.form-status.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.form-status.loading {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

/* ============================================
   Accessibility
   ============================================ */
.form-nav .btn:focus-visible,
.form-input:focus-visible,
.radio-label:focus-within,
.checkbox-label:focus-within {
  outline: 2px solid #e09900;
  outline-offset: 2px;
}

/* ============================================
   reCAPTCHA Badge (hidden per Google's policy -
   attribution text included in footer instead)
   ============================================ */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .progress-wrapper,
  .form-nav {
    display: none;
  }

  .form-section {
    display: block !important;
    page-break-inside: avoid;
  }
}
