/* T-091 — финальный шаг захвата лида. Слой поверх собранного бандла quiz.
   Токены — те же, что у прода quiz (см. T-091d §0): zinc-950/900/800, orange-500. */

.qf-final {
  max-width: 480px;
  margin: 2rem auto 0;
  padding: 2rem;
  border-radius: 1rem;
  background: #18181b;
  border: 1px solid #27272a;
  color: #fafafa;
  font-family: Urbanist, ui-sans-serif, system-ui, sans-serif;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .qf-final {
    margin: 1.5rem 16px 0;
    padding: 1.5rem;
    max-width: none;
  }
}

.qf-final * {
  box-sizing: border-box;
}

.qf-final h2 {
  margin: 0 0 .5rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: #fafafa;
  line-height: 1.25;
}

.qf-support {
  margin: 0 0 1.5rem;
  color: #a1a1aa;
  font-size: .9375rem;
  line-height: 1.5;
}

.qf-label {
  display: block;
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fafafa;
}

.qf-final input[type="email"],
.qf-final input[type="text"],
.qf-final select {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  margin-bottom: 1rem;
  border-radius: .75rem;
  border: 1px solid #3f3f46;
  background: #09090b;
  color: #fafafa;
  font-family: inherit;
  font-size: 1rem;
}

.qf-final input::placeholder {
  color: #71717a;
}

.qf-final input:focus,
.qf-final select:focus {
  outline: 2px solid #f97316;
  outline-offset: 2px;
  border-color: #f97316;
}

.qf-consent {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  min-height: 44px;
}

.qf-consent input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-top: 2px;
  accent-color: #f97316;
}

.qf-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.qf-consent span {
  font-size: .875rem;
  color: #a1a1aa;
  line-height: 1.5;
}

.qf-consent a {
  color: #f97316;
  text-decoration: underline;
}

.qf-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 48px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 9999px;
  background: #f97316;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s, transform .15s;
}

.qf-btn:hover:not(:disabled) {
  background: #ea580c;
  transform: translateY(-1px);
}

.qf-btn:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.qf-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.qf-honest {
  margin: .875rem 0 0;
  text-align: center;
  font-size: .8125rem;
  color: #a1a1aa;
}

.qf-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: qf-spin .7s linear infinite;
}

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

.qf-mql {
  margin-top: 1.25rem;
}

.qf-mql summary {
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 600;
  color: #a1a1aa;
  list-style: none;
  padding: .5rem 0;
}

.qf-mql summary::-webkit-details-marker {
  display: none;
}

.qf-mql summary::before {
  content: "+ ";
  color: #f97316;
}

.qf-mql[open] summary::before {
  content: "− ";
}

.qf-mql-fields {
  margin-top: .75rem;
}

.qf-mql-fields input,
.qf-mql-fields select {
  margin-bottom: .75rem;
}

.qf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Состояние SUCCESS */
.qf-success {
  text-align: center;
  padding: 1rem 0;
}

.qf-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .3);
}

.qf-success-icon svg {
  width: 28px;
  height: 28px;
}

.qf-success h2 {
  text-align: center;
}

.qf-success p {
  color: #a1a1aa;
  font-size: .9375rem;
  margin: 0;
}

/* Состояние ERROR */
.qf-error h2 {
  color: #fafafa;
}

.qf-error p {
  color: #a1a1aa;
  font-size: .9375rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.qf-error a.qf-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  margin: 0 0 1.25rem;
  border-radius: .75rem;
  border: 1px solid #f97316;
  color: #f97316;
  text-decoration: none;
  font-weight: 600;
  font-size: .9375rem;
}

.qf-error a.qf-fallback:hover {
  background: rgba(249, 115, 22, .1);
}

.qf-field-error {
  margin: -.75rem 0 1rem;
  font-size: .8125rem;
  color: #f87171;
}

.qf-final [hidden] {
  display: none !important;
}
