/* =========================================================
   Components — botões, inputs, opções, monograma
   Replicam o design Boutique do handoff (Boutique.jsx)
   ========================================================= */

/* Sem highlight azul no tap (mobile) e sem outline nativo */
* { -webkit-tap-highlight-color: transparent; }
button { outline: none; }
button:focus { outline: none; }
button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

/* Header lockup — símbolo S + texto "Sophos Creare"
   Usado em todas as telas (welcome, quiz, calculando, resultado). */
.mark-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mark-row .mark-symbol {
  height: 36px;
  width: auto;
  display: block;
  opacity: 0.95;
  flex-shrink: 0;
}
.mark-row .mark-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1;
}
@media (max-width: 720px) {
  .mark-row .mark-symbol { height: 30px; }
  .mark-row .mark-text { font-size: 16px; }
}

/* Pattern de fundo aplicado em telas com background plum */
.pattern-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/pattern-plum.png");
  background-size: 520px;
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Botão primário cream sobre plum */
.btn-cream {
  background: var(--cream);
  color: var(--plum-deep);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 16px 30px;
  border: none;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: transform 200ms var(--ease-smooth), background 200ms ease;
}
.btn-cream:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
}
.btn-cream:active:not(:disabled) {
  transform: scale(0.97);
}
.btn-cream:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-cream .arrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2em;
}

/* Botão fantasma (secundário) */
.btn-ghost {
  background: transparent;
  color: var(--stone);
  border: 1px solid rgba(229, 228, 224, 0.25);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  transition: all 200ms ease;
}
.btn-ghost:hover {
  border-color: var(--cream);
  color: var(--cream);
}

/* Opção (radio styled) — usado nas perguntas */
.opt {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: rgba(229, 228, 224, 0.04);
  border: 1px solid rgba(229, 228, 224, 0.16);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--cream);
  text-align: left;
  width: 100%;
  transition: all 200ms var(--ease-smooth);
}
.opt:hover {
  background: rgba(229, 228, 224, 0.08);
  border-color: rgba(229, 228, 224, 0.32);
}
.opt[aria-selected="true"] {
  background: var(--cream);
  color: var(--plum-deep);
  border-color: var(--cream);
}
.opt-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  background: transparent;
  flex-shrink: 0;
  transition: all 200ms ease;
}
.opt[aria-selected="true"] .opt-mark {
  background: var(--plum-deep);
  border-color: var(--plum-deep);
}
/* Multi-select: marker quadrado pra indicar checkbox em vez de radio */
.opt--multi .opt-mark {
  border-radius: 2px;
  width: 11px;
  height: 11px;
}
.opt--multi[aria-selected="true"] .opt-mark {
  background: var(--plum-deep);
  border-color: var(--plum-deep);
}

/* Hint textual abaixo do título (multi-select) */
.q-hint {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.65;
  margin: -20px 0 18px;
}

/* Input de texto Sophos */
.input-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 600;
}
.input-field {
  background: transparent;
  color: var(--cream);
  border: none;
  border-bottom: 1px solid rgba(229, 228, 224, 0.32);
  font-family: var(--serif);
  font-size: clamp(22px, 4.6vw, 32px);
  line-height: 1.2;
  padding: 12px 0 14px;
  width: 100%;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color 200ms ease;
  caret-color: var(--cream);
}
.input-field::placeholder {
  color: var(--stone);
  opacity: 0.5;
  font-style: italic;
}
.input-field::selection {
  background: var(--cream);
  color: var(--plum-deep);
}
.input-field:focus {
  border-bottom-color: var(--cream);
  outline: none;
}
/* Override do autofill do Chrome (que injeta fundo branco/cinza feio) */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus,
.input-field:-webkit-autofill:active {
  -webkit-text-fill-color: var(--cream);
  -webkit-box-shadow: 0 0 0 1000px var(--plum-deep) inset;
  caret-color: var(--cream);
  transition: background-color 5000s ease-in-out 0s;
  font-family: var(--serif);
}
.input-hint {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--stone);
  opacity: 0.7;
}
.input-error {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--wine);
  font-weight: 500;
}

/* Select estilizado (Fase I — especialidade) */
.select-field {
  background: transparent;
  color: var(--cream);
  border: none;
  border-bottom: 1px solid rgba(229, 228, 224, 0.32);
  font-family: var(--serif);
  font-size: 28px;
  padding: 12px 0;
  width: 100%;
  outline: none;
  appearance: none;
  cursor: pointer;
}
.select-field option {
  background: var(--plum-deep);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
}

/* Sinuous progress bar (S do logo estilizado) */
.sinuous {
  width: 100%;
  height: 12px;
  opacity: 0.9;
}

/* Counter "10 de 22" */
.q-count {
  font-family: var(--sans);
  font-size: 12px;
}
.q-count .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--cream);
}
.q-count .of {
  color: var(--stone);
  opacity: 0.5;
  margin: 0 6px;
  font-family: var(--serif);
  font-style: italic;
}
.q-count .total {
  color: var(--stone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}

/* Phase tag (fase iii · provocações) */
.phase-tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 600;
  margin-bottom: 18px;
}
.phase-tag em { font-family: var(--serif); font-style: italic; text-transform: lowercase; letter-spacing: 0; font-size: 13px; }

/* Restart button (canto inferior direito) */
.restart {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--stone);
  opacity: 0.7;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.restart:hover { opacity: 1; }
