/* onboarding.css — estilos da página pública de captação de leads
   (onboarding.html). Espelha 1:1 o <style> da última versão aprovada no
   artifact (claude.ai/artifact/BiAgmfccvUGVvtK1iXhnWR), mesmo padrão de
   CSS externo em webapp/assets/ já usado por custom-styles.css. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800;900&display=swap");

:root {
    --green: #2D5A4E;
    --green-dark: #1b4332;
    --gold: #D2B48C;
    --gold-dark: #C19A6B;
    --bg-color: #f0f5f3;
}

* { box-sizing: border-box; font-family: "Inter", sans-serif; }

body {
    margin: 0;
    background-color: var(--green-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}
body.loaded {
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, rgba(210, 180, 140, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(45, 90, 78, 0.1) 0px, transparent 50%);
}

/* --- TELA INTRO: LOGO BROTANDO --- */
#intro-splash {
    position: fixed; inset: 0; background: var(--green-dark); z-index: 999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#intro-splash.fade-out { opacity: 0; visibility: hidden; }
.splash-logo {
    width: 90px; height: 90px; object-fit: contain;
    animation: sproutLogo 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    filter: drop-shadow(0 0 20px rgba(210, 180, 140, 0.4));
}
@keyframes sproutLogo {
    0% { transform: scale(0.1); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.glass-container {
    width: 100%;
    max-width: 480px;
    margin: 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(27, 67, 50, 0.08);
    padding: 36px 24px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-container.show { opacity: 1; transform: scale(1); }

.step {
    display: none; opacity: 0; transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.step.active { display: block; opacity: 1; transform: translateX(0); }
/* Saída do card anterior — mesmo princípio do fade do #intro-splash
   (opacity anima primeiro, "display" só volta a none depois que a
   transição termina, via JS). Sem isso o passo antigo sumia na hora
   (display:none corta a transição), dando a sensação de corte seco. */
.step.leaving { display: block; opacity: 0; transform: translateX(-20px); }

.title {
    font-size: 24px; font-weight: 900; color: var(--green-dark);
    text-align: center; line-height: 1.2; margin-bottom: 8px; letter-spacing: -0.5px;
}
.subtitle {
    font-size: 14px; color: rgba(45, 90, 78, 0.7);
    text-align: center; margin-bottom: 24px; font-weight: 500;
}

/* --- INPUTS PREMIUM (Fundo mais claro, texto verde) --- */
.input-group { margin-bottom: 16px; }
.hs-input {
    width: 100%; border: 1.5px solid rgba(45, 90, 78, 0.15); outline: none;
    border-radius: 16px; padding: 16px 18px;
    background-color: #f8faf9;
    box-shadow: inset 0 2px 4px rgba(45, 90, 78, 0.02);
    transition: 300ms ease-in-out;
    color: var(--green-dark);
    font-weight: 700; font-size: 15px;
}
.hs-input::placeholder { color: rgba(45, 90, 78, 0.4); font-weight: 500; }
.hs-input:focus {
    background-color: white; transform: scale(1.01);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(210, 180, 140, 0.2);
}
.hs-input:-webkit-autofill,
.hs-input:-webkit-autofill:hover,
.hs-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--green-dark);
    -webkit-box-shadow: 0 0 0px 1000px #f8faf9 inset;
    box-shadow: 0 0 0px 1000px #f8faf9 inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* --- CHECKBOX / RADIO ANIMADO --- */
.option-card {
    display: flex; align-items: center; padding: 14px 16px;
    background: white; border-radius: 16px; margin-bottom: 10px; cursor: pointer;
    border: 1.5px solid rgba(45, 90, 78, 0.1); transition: all 0.2s ease; position: relative;
}
.option-card:hover { border-color: var(--gold); }
.option-text {
    margin-left: 14px; font-weight: 600; color: var(--green-dark); font-size: 13.5px; line-height: 1.3;
}
.badge-fav {
    position: absolute; top: -8px; right: 16px; background: var(--gold-dark);
    color: white; font-size: 9px; font-weight: 900; text-transform: uppercase;
    padding: 2px 8px; border-radius: 6px; letter-spacing: 0.5px;
}

.checkbox-wrapper-12 { position: relative; flex-shrink: 0; }
.checkbox-wrapper-12 > svg { position: absolute; top: -130%; left: -170%; width: 110px; pointer-events: none; }
.checkbox-wrapper-12 input[type="radio"] { -webkit-appearance: none; appearance: none; margin: 0; cursor: pointer; outline: 0; }
.checkbox-wrapper-12 .cbx { width: 22px; height: 22px; position: relative; }
.checkbox-wrapper-12 .cbx input { position: absolute; top: 0; left: 0; width: 22px; height: 22px; border: 2px solid #bfbfc0; border-radius: 50%; }
.checkbox-wrapper-12 .cbx label { width: 22px; height: 22px; background: none; border-radius: 50%; position: absolute; top: 0; left: 0; pointer-events: none; }
.checkbox-wrapper-12 .cbx svg { position: absolute; top: 4px; left: 3px; z-index: 1; pointer-events: none; }
.checkbox-wrapper-12 .cbx svg path { stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 19; stroke-dashoffset: 19; transition: stroke-dashoffset 0.3s ease; transition-delay: 0.2s; }
.checkbox-wrapper-12 .cbx input:checked + label { animation: splash-12 0.6s ease forwards; }
.checkbox-wrapper-12 .cbx input:checked + label + svg path { stroke-dashoffset: 0; }

@keyframes splash-12 {
    40% { background: var(--gold-dark); box-shadow: 0 -18px 0 -8px var(--gold-dark), 16px -8px 0 -8px var(--gold-dark), 16px 8px 0 -8px var(--gold-dark), 0 18px 0 -8px var(--gold-dark), -16px 8px 0 -8px var(--gold-dark), -16px -8px 0 -8px var(--gold-dark); }
    100% { background: var(--gold-dark); box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent; }
}

/* --- CARD ROTATIVO DE TAXAS --- */
.card-rotativo-wrapper { width: 100%; height: 250px; perspective: 1000px; margin-bottom: 20px; }
.card-rotativo { width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); position: relative; border-radius: 20px; cursor: pointer; }
.card-rotativo.flipped { transform: rotateY(180deg); }

.card-face {
    position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    background-color: var(--green); border-radius: 20px; padding: 20px; color: white;
    display: flex; flex-direction: column; justify-content: space-between; border: 2px solid var(--gold);
    box-shadow: 0 10px 25px rgba(27, 67, 50, 0.2);
}
.card-face.back { transform: rotateY(180deg); }
.card-face h3 { font-size: 17px; font-weight: 900; margin: 0; color: var(--gold); text-transform: uppercase; text-align: center; line-height: 1.15; white-space: nowrap; }
.card-face-divider { width: calc(100% + 40px); height: 2px; margin: 10px -20px; background: var(--gold); border: none; }
.card-face p { font-size: 13px; line-height: 1.5; margin: 0; opacity: 0.95; }
.fee-intro { margin-bottom: 10px; }

.repasse-icons { display: flex; align-items: center; gap: 22px; justify-content: center; margin-top: 26px; }
.flow-icon { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.flow-icon-logo, .flow-icon-person { width: 42px; height: 42px; background: rgba(255,255,255,0.15); }
.flow-icon-logo img { width: 68%; height: 68%; object-fit: contain; }
.flow-icon-person svg { width: 55%; height: 55%; fill: var(--gold); }
.flow-icon-arrows { width: 26px; height: 26px; background: none; }
.flow-icon-arrows svg { width: 100%; height: 100%; stroke: var(--gold); fill: none; }

.fee-layout { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fee-highlight { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; text-align: center; font-size: clamp(20px, 7vw, 26px); font-weight: 900; color: var(--gold); }
.payment-table-label { text-align: center; color: var(--gold); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.payment-table { width: 100%; max-width: 230px; margin: 0 auto; border-collapse: collapse; }
.payment-table td { border: 1px solid var(--gold); padding: 5px 8px; font-size: 11.5px; text-align: center; }
.card-hint { font-size: 11px; font-weight: 700; color: rgba(210, 180, 140, 0.6); text-align: right; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.card-hint svg { width: 11px; height: 11px; fill: var(--gold); }

/* --- BOTÃO TECH ANIMADO --- */
.btn-wrapper { margin-top: 24px; display: flex; justify-content: center; width: 100%; }
.button {
    --border_radius: 9999px; --transtion: 0.3s ease-in-out;
    cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 1.1rem 2rem; background-color: transparent; border: none; border-radius: var(--border_radius);
    transform: scale(calc(1 + (var(--active, 0) * 0.05))); transition: transform var(--transtion);
    -webkit-tap-highlight-color: transparent;
}
.button::before {
    content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; background-color: var(--green-dark); border-radius: var(--border_radius);
    box-shadow: inset 0 0.5px rgba(255,255,255,0.2), 0px 4px 15px rgba(27, 67, 50, 0.3),
                0 0 0 calc(var(--active, 0) * 0.375rem) rgba(210, 180, 140, 0.4);
    transition: all var(--transtion); z-index: 0;
}
.button::after {
    content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; background-color: var(--green);
    background-image: radial-gradient(at 51% 89%, rgba(210, 180, 140, 0.4) 0px, transparent 50%);
    opacity: var(--active, 0); border-radius: var(--border_radius); transition: opacity var(--transtion); z-index: 2;
}
.button.is-clicked { --active: 1; transform: scale(0.95); }
.button .dots_border {
    --size_border: calc(100% + 4px); overflow: hidden; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: var(--size_border); height: var(--size_border); background-color: transparent; border-radius: var(--border_radius); z-index: -1;
}
.button .dots_border::before {
    content: ""; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); transform-origin: left;
    width: 100%; height: 2rem; background-color: var(--gold); mask: linear-gradient(transparent 0%, white 120%);
    -webkit-mask: linear-gradient(transparent 0%, white 120%); animation: rotate 2s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.button .sparkle { position: relative; z-index: 10; width: 1.4rem; color: var(--gold); }
.button .sparkle .path { fill: currentColor; stroke: currentColor; transform-origin: center; animation: path 1.5s linear 0.5s infinite; }
@keyframes path { 0%, 34%, 71%, 100% { transform: scale(1); } 17%, 49%, 83% { transform: scale(1.2); } }
.button .text_button { position: relative; z-index: 10; font-size: 1rem; font-weight: 800; color: white; letter-spacing: 0.5px; text-transform: uppercase; }

/* --- MOEDA 3D HORSESMART (COM LOGO) --- */
.loader-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; }
.hs-coin {
    font-size: 100px; width: 1em; height: 1em;
    margin: 0 auto 24px; position: relative;
    animation: rotate_hs_coin 4s infinite linear; transform-style: preserve-3d;
}
/* Borda (espessura) da moeda */
.hs-coin::before {
    content: ""; position: absolute; top: 0; left: 0.45em; width: 0.1em; height: 1em;
    border-radius: 0.05em; background: linear-gradient(#f2ddb2, #C19A6B, #8b6d43);
    transform: rotateY(90deg);
}
/* Faces: mesmo padrão do logo HorseSmart (fundo verde + aro dourado) nos dois lados */
.hs-coin .side {
    position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
    background: radial-gradient(circle at 35% 30%, var(--green) 0%, var(--green-dark) 70%);
    box-shadow: inset 0 0 0 0.035em var(--gold), inset 0 0 0 0.06em var(--gold-dark), inset 0 0 0.12em rgba(0,0,0,0.35);
    display: flex; align-items: center; justify-content: center;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.hs-coin .heads { transform: translateZ(0.05em); }
.hs-coin .tails { transform: rotateY(180deg) translateZ(0.05em); }
.hs-coin .side img { width: 60%; height: 60%; object-fit: contain; filter: drop-shadow(0 0 6px rgba(210, 180, 140, 0.4)); }
@keyframes rotate_hs_coin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
.loading-text { font-weight: 800; color: var(--green); font-size: 15px; text-align: center; animation: pulseText 1.5s infinite; }
@keyframes pulseText { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- CARD DE RESUMO --- */
.plan-card {
    background: linear-gradient(145deg, #ffffff, #f8fcfb);
    border-radius: 20px; padding: 20px; border: 1px solid rgba(45, 90, 78, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 20px; max-height: 280px; overflow-y: auto;
}
.plan-item { display: flex; align-items: flex-start; margin-bottom: 12px; }
.plan-item:last-child { margin-bottom: 0; }
.plan-icon { width: 22px; height: 22px; color: var(--gold-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 18px; flex-shrink: 0; margin-top: 2px; }
/* Default defensivo: todo ícone dentro de .plan-icon nasce "linha" (sem
   preenchimento, traço na cor do ícone) — evita ícone preto/sem cor se
   algum SVG futuro esquecer de declarar fill/stroke no próprio path. */
.plan-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.plan-icon svg [fill="currentColor"] { fill: currentColor; stroke: none; }
.plan-text { font-size: 13px; font-weight: 600; color: var(--green-dark); }

/* --- LISTAS COMPACTAS (sem rolagem) --- */
.compact-list .option-card { padding: 10px 14px; margin-bottom: 8px; }
.compact-list .option-text { font-size: 13px; margin-left: 12px; }
.compact-list .checkbox-wrapper-12 .cbx { transform: scale(0.82); }
.compact-list.has-badge { padding-top: 8px; }

/* --- CARD DE TAXAS: mesma largura/altura do card de dados-vet.html --- */
.card-rotativo-wrapper { width: 320px; max-width: 100%; height: 420px; margin: 0 auto 20px; }
.card-rotativo { display: grid; }
.card-rotativo .card-face { grid-area: 1 / 1; gap: 14px; overflow-y: auto; }
.card-face p { font-size: clamp(13.5px, 3.8vw, 15px); line-height: 1.5; overflow-wrap: anywhere; }
.card-hint .hint-logo { width: 16px; height: 16px; object-fit: contain; }

.error-msg { color: #dc2626; font-size: 13px; font-weight: 600; text-align: center; margin-top: 10px; display: none; }

/* --- TOAST PADRONIZADO (mostrarToast, modules/modulos_app/toast.js) ---
   mostrarToast() só alterna classList — as classes abaixo são as mesmas
   que ele usa (normalmente vindas do Tailwind), reescritas à mão aqui pra
   não precisar carregar o CDN do Tailwind (que reseta estilo global e
   quebrava a arte da página). Único CSS externo real: Font Awesome, só
   pro ícone do toast. */
#toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    padding: 24px 32px; border-radius: 16px; font-weight: 900;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
    z-index: 9999; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 91.666%; pointer-events: none;
}
#toast.hidden { display: none; }
#toast.opacity-0 { opacity: 0; }
#toast.opacity-100 { opacity: 1; }
#toast.bg-vetsmart-green { background: var(--green); }
#toast.bg-red-900\/95 { background: rgba(127, 29, 29, 0.95); }
#toast.max-w-xs { max-width: 320px; }
#toast.max-w-sm { max-width: 384px; }
#toast.text-white { color: #fff; }
#toast.border-2 { border: 2px solid transparent; }
#toast.border-red-400\/40 { border-color: rgba(248, 113, 113, 0.4); }
#toast-icon { font-size: 32px; }
#toast-icon.text-vetsmart-gold { color: var(--gold); }
#toast-icon.text-yellow-400 { color: #facc15; }
#toast-icon.text-red-400 { color: #f87171; }
#toast-msg { color: #fff; font-size: 15px; }
