/* ==========================================================
   MS Contempladas · Área do Parceiro
   ========================================================== */

.msap {
    --fundo: #050505;
    --superficie: #111111;
    --campo: #171717;
    --campo-foco: #1d1d1d;
    --borda: #262626;
    --borda-forte: #3a3a3a;
    --texto: #f5f5f5;
    --texto-2: #a3a3a3;
    --texto-3: #6b6b6b;
    --erro: #ff6b6b;
    --ok: #4ade80;
    --raio: 10px;
    --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    font-family: var(--fonte);
    color: var(--texto);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
.msap *, .msap *::before, .msap *::after { box-sizing: border-box; }
.msap [hidden], .msap-modal[hidden] { display: none !important; }

/* ---------- Página cheia ---------- */
.msap-body { margin: 0; background: #000; min-height: 100vh; }
.msap--pagina { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--fundo); }

.msap-hero { position: relative; flex: 1.1; overflow: hidden; display: flex; }
.msap-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.msap-hero__veu {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 80% at 0% 100%, rgba(0,0,0,.95) 10%, transparent 70%),
        linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 100%);
}
.msap-hero__conteudo { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; width: 100%; }
.msap-logo img { max-width: 190px; height: auto; display: block; }
.msap-logo__texto { font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; }
.msap-selo {
    display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--texto-2); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 12px; margin-bottom: 20px;
    background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
}
.msap-hero h1 { margin: 0 0 24px; font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; text-transform: uppercase; }
.msap-hero h1 span { color: #8a8a8a; }
.msap-beneficios { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: #d4d4d4; font-size: .95rem; }
.msap-beneficios li { display: flex; align-items: center; gap: 10px; }
.msap-beneficios li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; flex: none; }

.msap-painel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.msap--pagina .msap-painel { background: var(--fundo); border-left: 1px solid #141414; }
.msap-cartao { width: 100%; max-width: 400px; }

/* ---------- Embutido (shortcode) ---------- */
.msap--embutido { display: flex; justify-content: center; padding: 24px 0; }
.msap--embutido .msap-painel { padding: 0; width: 100%; }
.msap--embutido .msap-cartao { background: var(--fundo); border: 1px solid var(--borda); border-radius: 16px; padding: 36px 32px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }

/* ---------- Cabeçalho do form ---------- */
.msap-titulo { margin: 0; font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--texto); text-transform: uppercase; }
.msap-subtitulo { margin: 6px 0 28px; color: var(--texto-2); font-size: .92rem; }

/* ---------- Campos ---------- */
.msap-campo { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.msap-campo label, .msap-campo legend { display: block; font-size: .82rem; font-weight: 600; color: #d4d4d4; margin-bottom: 7px; padding: 0; }
.msap-rotulo-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.msap-rotulo-linha label { margin-bottom: 7px; }

.msap-input { position: relative; }
.msap-input > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; fill: var(--texto-3); pointer-events: none; transition: fill .2s; }
.msap-input:focus-within > svg { fill: var(--texto); }

.msap .msap-input input,
.msap .msap-simples {
    width: 100%; height: 50px; margin: 0;
    background: var(--campo); color: var(--texto);
    border: 1px solid var(--borda); border-radius: var(--raio);
    font: 500 .95rem/1 var(--fonte);
    outline: none; transition: border-color .2s, background-color .2s, box-shadow .2s;
    -webkit-appearance: none; appearance: none;
}
.msap .msap-input input { padding: 0 46px 0 44px; }
.msap .msap-simples { padding: 0 14px; }
.msap .msap-input input::placeholder, .msap .msap-simples::placeholder { color: #555; }
.msap .msap-input input:hover, .msap .msap-simples:hover { border-color: var(--borda-forte); }
.msap .msap-input input:focus, .msap .msap-simples:focus { border-color: #8a8a8a; background: var(--campo-foco); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.msap .msap-input input[aria-invalid="true"], .msap .msap-simples[aria-invalid="true"] { border-color: var(--erro); }

/* campo só leitura (e-mail na tela de criar senha) */
.msap .msap-input input[readonly] { color: var(--texto-2); cursor: default; background: #121212; }
.msap .msap-input input[readonly]:focus { box-shadow: none; border-color: var(--borda); }
a.msap-botao { text-decoration: none; }

/* select com seta */
.msap select.msap-simples {
    cursor: pointer; padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 20px;
}
.msap select.msap-simples option { background: #111; color: #fff; }

/* Autopreenchimento do Chrome sem aquele fundo amarelo/branco */
.msap input:-webkit-autofill,
.msap input:-webkit-autofill:hover,
.msap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--texto);
    -webkit-box-shadow: 0 0 0 1000px var(--campo) inset;
    caret-color: var(--texto);
    transition: background-color 9999s ease-out 0s;
}

/* olho da senha */
.msap-olho {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
    display: grid; place-items: center; padding: 0;
}
.msap-olho svg { width: 20px; height: 20px; fill: var(--texto-3); transition: fill .2s; }
.msap-olho:hover svg { fill: var(--texto); }
.msap-olho__fechar { display: none; }
.msap-olho[aria-pressed="true"] .msap-olho__abrir { display: none; }
.msap-olho[aria-pressed="true"] .msap-olho__fechar { display: block; }

/* lembrar */
.msap-lembrar { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; font-size: .88rem; color: var(--texto-2); cursor: pointer; user-select: none; }
.msap-lembrar input { width: 17px; height: 17px; margin: 0; accent-color: #fff; cursor: pointer; }

/* ---------- Botões ---------- */
.msap-botao {
    position: relative; width: 100%; height: 52px; margin: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: transparent; color: #fff; border: 1.5px solid #fff; border-radius: var(--raio);
    font: 600 1rem/1 var(--fonte); cursor: pointer; letter-spacing: .01em;
    transition: background-color .2s, color .2s, transform .1s;
}
.msap-botao:hover { background: #fff; color: #000; }
.msap-botao:active { transform: scale(.985); }
.msap-botao--cheio { background: #fff; color: #000; border-color: #fff; margin-top: 6px; }
.msap-botao--cheio:hover { background: #d9d9d9; border-color: #d9d9d9; }
.msap-botao[disabled] { cursor: progress; opacity: .85; }

.msap-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: msap-gira .7s linear infinite; }
.msap-botao.carregando .msap-spinner { display: inline-block; }
@keyframes msap-gira { to { transform: rotate(360deg); } }

.msap :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.msap .msap-input input:focus-visible, .msap .msap-simples:focus-visible { outline: none; }

.msap-link-sutil { font-size: .8rem; color: var(--texto-2); text-decoration: none; }
.msap-link-sutil:hover { color: #fff; text-decoration: underline; }
.msap-rodape { margin: 26px 0 0; text-align: center; font-size: .92rem; color: var(--texto-2); }
.msap-link-forte { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; color: #fff; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.msap-link-forte:hover { text-decoration-thickness: 2px; }

/* ---------- Alertas ---------- */
.msap-alerta { padding: 12px 14px; border-radius: var(--raio); margin: 0 0 18px; font-size: .88rem; font-weight: 500; }
.msap-alerta--erro { color: var(--erro); background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.3); }
.msap-alerta--ok { color: var(--ok); background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); }
.msap-tremer { animation: msap-tremer .4s; }
@keyframes msap-tremer { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

/* ---------- Modal ---------- */
.msap-modal {
    position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0,0,0,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .25s ease;
    font-family: var(--fonte);
}
.msap-modal.aberto { opacity: 1; }
.msap-modal__caixa {
    position: relative; width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto;
    background: #0a0a0a; border: 1px solid var(--borda); border-radius: 16px; padding: 36px 32px 30px;
    transform: translateY(16px) scale(.98); transition: transform .3s cubic-bezier(.16,1,.3,1);
    box-shadow: 0 40px 80px -20px rgba(0,0,0,.8);
}
.msap-modal.aberto .msap-modal__caixa { transform: none; }
.msap-modal__fechar { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--texto-2); font-size: 26px; line-height: 1; cursor: pointer; }
.msap-modal__fechar:hover { color: #fff; background: #1a1a1a; }
.msap-modal h3 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.msap-modal__texto { margin: 0 0 24px; color: var(--texto-2); font-size: .9rem; }

.msap-progresso { display: flex; gap: 6px; margin-bottom: 22px; padding-right: 40px; }
.msap-progresso span { flex: 1; height: 3px; border-radius: 3px; background: #262626; transition: background .3s; }
.msap-progresso span.ativo { background: #fff; }

.msap-etapa { display: none; }
.msap-etapa.ativa { display: block; animation: msap-entrar .35s cubic-bezier(.16,1,.3,1); }
.msap-etapa--fim { text-align: center; padding-top: 8px; }
.msap-check { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.35); }
.msap-check svg { width: 32px; height: 32px; fill: var(--ok); }

.msap-opcoes { display: grid; gap: 10px; }
.msap-opcao { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.msap-opcao input { position: absolute; opacity: 0; pointer-events: none; }
.msap-opcao span {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: var(--campo); border: 1px solid var(--borda); border-radius: var(--raio);
    font-size: .93rem; font-weight: 500; color: #e5e5e5; transition: border-color .2s, background .2s;
}
.msap-opcao span::before { content: ''; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid #555; transition: all .2s; }
.msap-opcao:hover span { border-color: var(--borda-forte); }
.msap-opcao input:checked + span { border-color: #fff; background: #1c1c1c; }
.msap-opcao input:checked + span::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px #1c1c1c; }
.msap-opcao input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.msap-voltar { display: block; width: 100%; margin-top: 8px; padding: 12px; background: none; border: 0; color: var(--texto-2); font: 500 .9rem var(--fonte); cursor: pointer; }
.msap-voltar:hover { color: #fff; }
.msap-pote { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Animações de entrada ---------- */
.msap-anim { opacity: 0; animation: msap-entrar .6s cubic-bezier(.16,1,.3,1) forwards; animation-delay: var(--d, 0s); }
@keyframes msap-entrar { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .msap-anim, .msap-etapa.ativa { animation: none; opacity: 1; }
    .msap-hero__video { display: none; }
    .msap-modal, .msap-modal__caixa { transition: none; }
}

/* ---------- Celular ---------- */
@media (max-width: 860px) {
    .msap--pagina { flex-direction: column; }
    .msap-hero { flex: none; min-height: 0; }
    .msap-hero__conteudo { padding: 22px 20px 26px; gap: 18px; }
    .msap-logo img { max-width: 110px; }
    .msap-selo { display: none; }
    .msap-hero h1 { font-size: 1.5rem; margin: 0; }
    .msap-beneficios { display: none; }
    .msap--pagina .msap-painel { border-left: 0; border-top: 1px solid #141414; align-items: flex-start; padding: 28px 20px 40px; }
    .msap-titulo { font-size: 1.8rem; }
    .msap-subtitulo { margin-bottom: 22px; }
    .msap .msap-input input, .msap .msap-simples { font-size: 16px; } /* evita zoom automático no iPhone */
}
@media (max-width: 480px) {
    .msap-modal { align-items: flex-end; padding: 0; }
    .msap-modal__caixa { border-radius: 18px 18px 0 0; padding: 30px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92dvh; }
    .msap--embutido .msap-cartao { padding: 28px 20px; }
}
