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

/* ── Reset / Container ───────────────────────────── */
.rene-survey-container {
    font-family: 'Inter', 'Tahoma', sans-serif;
    background: transparent;
    color: #333333;
    padding: 0;
}

/* ═══════════════════════════════════════════════════
   PÁGINA DE APRESENTAÇÃO
═══════════════════════════════════════════════════ */
.survey-intro {
    max-width: 1120px;
    width: 90vw;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    font-family: 'Inter', 'Tahoma', sans-serif;
}

/* Header azul */
.survey-intro-header {
    background: #0270c5;
    padding: 28px 36px 32px;
}

/* Logos */
.survey-intro-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 42px;
}
.survey-intro-logo-col {
    flex: 1;
    flex-basis: 50%;
    display: flex;
}
.survey-intro-logo-col.right {
    justify-content: flex-end;
}
.survey-intro-logo {
    height: auto !important;
    max-height: 110px !important;
    width: auto !important;
    max-width: 260px !important;
    object-fit: contain !important;
    background: #fff !important;
    border-radius: 6px !important;
    padding: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    box-sizing: border-box !important;
}
.survey-intro-logo.survey-intro-logo--cover {
    object-fit: cover !important;
    width: 240px !important;
    height: 90px !important;
}

/* H1 no header */
.survey-intro-title {
    color: #ffffff;
    font-family: "Tahoma", sans-serif;
    font-size: 32px;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}
.survey-intro-title.survey-intro-title--small {
    font-size: 16px !important;
}
.survey-intro-header.survey-intro-header--small {
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 36px;
    box-sizing: border-box;
}
.survey-intro-header.survey-intro-header--small .survey-intro-logos {
    margin-bottom: 32px;
}
.survey-intro-header.survey-intro-header--small .survey-intro-logo {
    max-height: 90px !important;
    max-width: 200px !important;
}

/* Corpo branco */
.survey-intro-body {
    background: #ffffff;
    padding: 32px 36px;
}

/* Subtítulo azul */
.survey-intro-subtitle {
    color: #0270c5;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 14px;
}

/* Markdown inline na descrição */
.survey-desc-h2 {
    display: block;
    font-family: "Tahoma", sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #0270c5;
    margin: 8px 0 4px;
}
.survey-text-blue {
    color: #0270c5;
    font-weight: 600;
}
.section-label {
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    color: #0270c5 !important;
    line-height: 1.2 !important;
    margin-block-end: 1rem !important;
    margin-block-start: .5rem !important;
    display: block;
}
.section-label strong, 
.section-label .survey-text-blue,
.question-label strong,
.question-label .survey-text-blue {
    font-weight: 500 !important;
}

/* Descrição */
.survey-intro-desc {
    color: #444;
    font-size: .95rem;
    margin: 0 0 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Instruções */
.survey-intro-instructions {
    background: #f7f9fc;
    border-left: 3px solid #0270c5;
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px;
}
.survey-intro-instructions strong {
    display: block;
    font-size: .9rem;
    color: #333;
    margin-bottom: 8px;
}
.survey-intro-instructions ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.survey-intro-instructions ul li {
    font-size: .88rem;
    color: #555;
    line-height: 1.6;
    padding: 2px 0;
}
.survey-intro-instructions ul li::before {
    content: '• ';
    color: #0270c5;
}

/* Período */
.survey-intro-period {
    font-size: .88rem;
    color: #555;
    margin: 0 0 24px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* Título de Seção entre questões */
.survey-section-title {
    font-family: "Tahoma", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 24px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0270c5;
}

/* Footer com botão Seguinte */
.survey-intro-footer {
    display: flex;
    justify-content: flex-end;
}


.survey-form-premium {
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

/* ── Branding (pequeno, discreto) ────────────────── */
.safesurvey-brand {
    display: none; /* Clean mode — sem branding no topo */
}

/* ── Stepper Pagination ──────────────────────────── */
.survey-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    padding: 10px 0;
}
.step-wrapper {
    display: flex;
    align-items: center;
}
.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #9ea5b1;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.step-node.step-active {
    border-color: #0270c5;
    color: #0270c5;
    background: #f0f7ff;
}
.step-node.step-completed {
    border-color: #04d361;
    color: #04d361;
    background: #f0fff4;
}
.step-line {
    width: 60px;
    height: 1.5px;
    background: #d1d5db;
    margin: 0 4px;
}
.step-line.line-completed {
    background: #04d361;
}

@media (max-width: 600px) {
    .step-line { width: 30px; }
    .survey-intro-header.survey-intro-header--small .survey-intro-logos {
        flex-direction: row !important;
        margin-bottom: 10px;
    }
}

/* ── Question block ──────────────────────────────── */
.question-block {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ececec;
}
.question-block:last-of-type {
    border-bottom: none;
    margin-bottom: 32px;
}

/* Error state */
.question-block.question-error .question-label {
    color: #c0392b;
}
.question-block.question-error {
    animation: rs-shake .3s ease;
}
@keyframes rs-shake {
    0%,100%{transform:translateX(0)}
    25%{transform:translateX(-5px)}
    75%{transform:translateX(5px)}
}

.question-label {
    display: block;
    font-family: "Tahoma", sans-serif !important;
    font-size: 1rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    line-height: 1.5;
}
.question-label span {
    /* número incluído no texto — nada especial */
}

/* ── Radio options ───────────────────────────────── */
.options-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    transition: background .12s ease;
}
.radio-option:hover {
    background: #f5f7fa;
}

/* Input nativo — mantemos mas estilizamos levemente */
.radio-option input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: #0270c5;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* Esconde o custom circle — usamos nativo aqui */
.radio-custom { display: none; }

.radio-label-text {
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    color: #333333;
    line-height: 1.4;
}
.radio-option:has(input:checked) .radio-label-text {
    font-weight: 500;
    color: #0270c5;
}
.radio-option:has(input:checked) {
    background: #f0f5ff;
}

/* ── Textarea ─────────────────────────────────────── */
.text-input-premium {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px 12px;
    color: #333;
    font-size: 16px !important;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif !important;
    transition: border-color .15s;
    resize: vertical;
}
.text-input-premium:focus {
    outline: none;
    border-color: #0270c5;
    box-shadow: 0 0 0 2px rgba(10,87,190,.1);
}
.text-input-premium::placeholder { color: #aaa; }

/* ── Navigation ──────────────────────────────────── */
.form-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #ececec;
}

.btn-nav {
    background: #aecce5;
    color: black;
    margin-right: 15px;
    font-family: "Tahoma", sans-serif;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: .92rem;
    transition: background .15s;
}
.btn-nav:hover {
    background: #9abedc;
}

.btn-premium {
    background-color: #0270C5 !important;
    color: white !important;
    font-family: "Tahoma", sans-serif !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    padding: 8px 15px !important;
    border: none !important;
    cursor: pointer !important;
    font-size: .92rem !important;
    transition: background .15s !important;
}
.btn-premium:hover:not(:disabled) {
    background: #015a9e !important;
}
.btn-premium:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.btn-premium.btn-submit {
    background-color: #28a745 !important;
}
.btn-premium.btn-submit:hover:not(:disabled) {
    background-color: #218838 !important;
}

.btn-nav.btn-back {
    background-color: transparent !important;
    color: #4a9dfa !important;
    border: 1.5px solid #4a9dfa !important;
    font-family: inherit;
    font-weight: 600;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    cursor: pointer;
    font-size: .92rem;
    transition: all .2s;
    margin-right: 12px;
}
.btn-nav.btn-back:hover {
    background-color: #f0f7ff !important;
    color: #0270c5 !important;
    border-color: #0270c5 !important;
}

/* ── Messages ─────────────────────────────────────── */
.survey-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: .92rem;
}
.survey-message.hidden { display: none; }
.survey-message.success {
    background: #edfbf3;
    color: #1a9e50;
    border: 1px solid #b7e9cb;
}
.survey-message.error {
    background: #fff5f5;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

/* ── Not found / empty ───────────────────────────── */
.rene-survey-not-found,
.empty-msg, .error {
    padding: 24px 0;
    color: #888;
    font-family: inherit;
    font-size: .95rem;
}

/* ── Success screen ───────────────────────────────── */
.survey-success-screen {
    max-width: 640px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    animation: rs-fadein .45s ease;
}
@keyframes rs-fadein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.survey-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
}
.survey-success-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.success-circle {
    stroke: #0270c5;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: draw-circle .55s ease forwards;
}
@keyframes draw-circle { to { stroke-dashoffset: 0; } }

.success-check {
    stroke: #0270c5;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: draw-check .35s .5s ease forwards;
}
@keyframes draw-check { to { stroke-dashoffset: 0; } }

.survey-success-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
}

.survey-success-sub {
    font-size: .97rem;
    color: #666;
    line-height: 1.65;
    max-width: 440px;
    margin: 0 auto 24px;
}

.survey-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f0f5ff;
    border: 1px solid #c8d9f5;
    color: #0270c5;
    font-size: .8rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 99px;
}

/* ── Button spinner ───────────────────────────────── */
.btn-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rs-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }

/* ── Mobile UI Adjustments ───────────────────────────── */
@media (max-width: 600px) {
    .survey-intro-header {
        padding: 20px 16px;
    }
    .survey-intro-logos {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        margin-bottom: 30px;
    }
    .survey-intro-logo-col {
        width: 100%;
        justify-content: center !important;
    }
    .survey-intro-logo {
        width: 100% !important;
        max-width: 240px !important;
        height: auto !important;
        min-height: 60px;
    }
    .survey-intro-title {
        font-size: 24px !important;
        text-align: center;
    }
    .survey-intro-body {
        padding: 24px 16px;
    }
    .survey-intro-subtitle {
        font-size: 1.1rem;
        text-align: center;
    }
    .form-navigation {
        flex-direction: column-reverse;
        gap: 15px;
    }
    .btn-nav, .btn-premium {
        width: 100%;
        margin-right: 0 !important;
    }
    .survey-intro-footer {
        justify-content: center;
    }
}
