/* ==========================================================================
   Pesquisa de Satisfação — página isolada.

   Não usa o main.css do site: aqui o cidadão chega por um link de e-mail para
   fazer uma coisa só. Menos peso, menos distração, nada de menu ou rodapé.
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 16px 64px;
    background: #edf1f5;
    color: #424b59;
    font-family: Montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand img {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.card {
    background: #fff;
    border-radius: 14px;
    border-bottom: 4px solid #00b4f4;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .07);
    padding: 36px 32px;
}

.card h1 {
    margin: 0 0 12px;
    color: #00516e;
    font-size: 26px;
    line-height: 1.25;
}

.lead {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 16px;
}

.protocol {
    display: inline-block;
    margin-bottom: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef4f7;
    color: #00516e;
    font-size: 14px;
    font-weight: 700;
}

/* --- perguntas ----------------------------------------------------------- */

.question {
    padding: 24px 0;
    border-top: 1px solid #eef2f6;
}

.question:first-of-type {
    border-top: 0;
}

.question.has-error {
    border-radius: 8px;
    box-shadow: 0 0 0 2px #d64550;
    padding-left: 12px;
    padding-right: 12px;
}

.question-text {
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.optional {
    color: #94a3b8;
    font-size: 15px;
    font-weight: 400;
}

.stars {
    display: flex;
    gap: 4px;
    max-width: 420px;
}

.star {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1 1 0;
    min-width: 0;
    background: none;
    border: 0;
    padding: 4px 2px 6px;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
}

/* Legenda fixa sob cada estrela: o cidadao sabe o que a nota significa antes
   de clicar, sem depender de passar o mouse. */
.star-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: color .12s;
}

.star.is-preview .star-label,
.star.is-active .star-label {
    color: #00516e;
}

.star svg {
    fill: #dbe4ec;
    transition: fill .12s, transform .12s;
}

.star.is-preview svg,
.star.is-active svg {
    fill: #f2b134;
}

.star:hover svg {
    transform: scale(1.1);
}

.star:hover .star-label {
    color: #64748b;
}

.star:focus-visible {
    outline: 2px solid #00b4f4;
    outline-offset: 2px;
}

.hint {
    min-height: 22px;
    margin-top: 8px;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
}

textarea {
    width: 100%;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    color: #424b59;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #00b4f4;
}

/* --- ações --------------------------------------------------------------- */

.submit {
    width: 100%;
    margin-top: 28px;
    padding: 16px 24px;
    border: 0;
    border-radius: 10px 3px;
    background: #00516e;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .15);
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s;
}

.submit:hover {
    background: #006a91;
}

.submit:disabled {
    opacity: .6;
    cursor: default;
}

.done {
    text-align: center;
    padding: 24px 0;
}

.done-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #7bc86c;
    color: #fff;
    font-size: 36px;
    line-height: 72px;
}

.done h2 {
    margin: 0 0 8px;
    color: #00516e;
    font-size: 24px;
}

.back {
    display: inline-block;
    margin-top: 22px;
    color: #00516e;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid #00b4f4;
    padding-bottom: 2px;
}

.foot {
    margin-top: 28px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.foot a {
    color: #64748b;
}

/* --- toast simples (sem depender de biblioteca) -------------------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    max-width: calc(100% - 32px);
    padding: 14px 22px;
    border-radius: 10px;
    background: #d64550;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.toast.is-open {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 560px) {
    body {
        padding: 24px 12px 48px;
    }

    .card {
        padding: 26px 20px;
    }

    .card h1 {
        font-size: 22px;
    }

    .question-text {
        font-size: 17px;
    }

    .star svg {
        width: 32px;
        height: 32px;
    }

    .star-label {
        font-size: 10px;
    }

    .stars {
        gap: 2px;
    }
}

/* --- campos de identificação (só a pesquisa da concessionária usa) ------- */

.field-label {
    display: block;
    margin: 16px 0 6px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
}

.field-label:first-of-type {
    margin-top: 4px;
}

input[type="text"],
select {
    width: 100%;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    color: #424b59;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #00b4f4;
}

.field-help {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.45;
}

/* Isca anti-robô: fora da tela, mas sem display:none — alguns robôs ignoram
   campos escondidos por display e preenchem os demais. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- perguntas de escolha única ----------------------------------------- */

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 8px;
    background: #00b4f4;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    vertical-align: 2px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e6edf3;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}

.option:hover {
    border-color: #9fd8f2;
    background: #f7fbfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.option:active {
    transform: translateY(0);
}

/* O input real fica invisível, mas continua no fluxo: teclado e leitor de
   tela seguem funcionando, e o :checked comanda a marca desenhada. */
.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.option-mark {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #cbd8e3;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s, background .15s;
}

/* O ponto interno cresce a partir do centro quando a opção é marcada. */
.option-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #00b4f4;
    transform: scale(0);
    transition: transform .16s cubic-bezier(.34, 1.56, .64, 1);
}

.option-text {
    color: #424b59;
    font-size: 16px;
    line-height: 1.35;
    transition: color .15s;
}

.option.is-checked,
.option:has(input:checked) {
    border-color: #00b4f4;
    background: #f2fafe;
    box-shadow: 0 4px 12px rgba(0, 180, 244, .12);
}

.option.is-checked .option-mark,
.option:has(input:checked) .option-mark {
    border-color: #00b4f4;
}

.option.is-checked .option-mark::after,
.option:has(input:checked) .option-mark::after {
    transform: scale(1);
}

.option.is-checked .option-text,
.option:has(input:checked) .option-text {
    color: #00516e;
    font-weight: 700;
}

.option:has(input:focus-visible) {
    outline: 2px solid #00b4f4;
    outline-offset: 3px;
}

@media (max-width: 560px) {
    .option {
        padding: 12px 14px;
        gap: 12px;
    }

    .option-text {
        font-size: 15px;
    }

    .option-mark {
        width: 22px;
        height: 22px;
    }

    .question-number {
        width: 23px;
        height: 23px;
        font-size: 13px;
    }
}

/* Subtítulo de pergunta (exemplos, esclarecimentos). */
.question-help {
    margin: -8px 0 14px 34px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 560px) {
    .question-help {
        margin-left: 0;
        font-size: 13px;
    }
}
