/* =========================================================
   CODELAB DIGITAL ADVISOR
   ========================================================= */

.chatbot-section {
    padding: 130px 0;

    background: var(--navy);

    color: white;
}

.chatbot-heading {
    max-width: 850px;

    margin-bottom: 60px;
}

.chatbot-heading h2 {
    font-size: clamp(46px, 5vw, 76px);

    line-height: .96;

    letter-spacing: -4px;
}

.chatbot-heading h2 span {
    color: var(--cyan);
}

.chatbot-heading p {
    max-width: 620px;

    margin-top: 28px;

    color: rgba(255,255,255,.62);

    font-size: 18px;
}


/* CHAT */

.advisor-chat {
    max-width: 900px;

    background: var(--ice);

    color: var(--navy);

    border-radius: 28px;

    overflow: hidden;

    box-shadow:
        0 35px 80px
        rgba(0,0,0,.18);
}


/* TOPBAR */

.chat-topbar {
    min-height: 85px;

    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: white;

    border-bottom:
        1px solid rgba(6,43,59,.1);
}

.chat-topbar > div:first-child {
    display: flex;
    flex-direction: column;
}

.chat-topbar strong {
    font-size: 17px;
}

.chat-topbar > div:first-child span {
    color: var(--graphite);

    font-size: 8px;

    letter-spacing: 3px;
}

.chat-status {
    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--graphite);

    font-size: 9px;

    letter-spacing: 2px;
}

.chat-status span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--teal);
}


/* MESSAGES */

.chat-messages {
    min-height: 540px;
    max-height: 650px;

    padding: 45px;

    overflow-y: auto;

    scroll-behavior: smooth;
}

.chat-welcome {
    max-width: 580px;
}

.chat-system-label,
.result-eyebrow {
    margin-bottom: 20px;

    color: var(--teal);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;
}

.chat-welcome h3 {
    font-size: 38px;

    letter-spacing: -2px;

    margin-bottom: 15px;
}

.chat-welcome p {
    color: var(--graphite);

    margin-bottom: 30px;
}

.chat-start-button {
    border: 0;

    padding: 18px 25px;

    background: var(--navy);

    color: white;

    cursor: pointer;

    font-size: 11px;

    letter-spacing: 2px;
}

.chat-start-button span {
    margin-left: 30px;
}


/* MESSAGE */

.chat-message {
    display: flex;

    flex-direction: column;

    margin-bottom: 25px;
}

.chat-message.bot {
    align-items: flex-start;
}

.chat-message.user {
    align-items: flex-end;
}

.message-label {
    margin-bottom: 7px;

    color: var(--graphite);

    font-size: 8px;

    letter-spacing: 2px;
}

.message-bubble {
    max-width: 72%;

    padding: 16px 20px;

    border-radius: 16px;

    font-size: 15px;
}

.bot .message-bubble {
    background: white;

    border-bottom-left-radius: 4px;
}

.user .message-bubble {
    background: var(--navy);

    color: white;

    border-bottom-right-radius: 4px;
}


/* OPTIONS */

.chat-options {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin: 5px 0 35px;
}

.chat-option {
    padding: 12px 18px;

    border:
        1px solid rgba(6,43,59,.15);

    border-radius: 100px;

    background: white;

    color: var(--navy);

    cursor: pointer;

    transition: .2s ease;
}

.chat-option:hover {
    border-color: var(--teal);

    color: var(--teal);

    transform: translateY(-2px);
}

.chat-option:disabled {
    opacity: .5;
}


/* PROGRESS */

.chat-progress-wrapper {
    padding: 20px 30px 25px;

    background: white;

    border-top:
        1px solid rgba(6,43,59,.1);
}

.chat-progress-info {
    display: flex;

    justify-content: space-between;

    margin-bottom: 10px;

    color: var(--graphite);

    font-size: 8px;

    letter-spacing: 2px;
}

.chat-progress {
    height: 3px;

    background: var(--light);
}

.chat-progress-bar {
    width: 0;
    height: 100%;

    background: var(--teal);

    transition: width .4s ease;
}


/* RESULT */

.chat-result {
    margin-top: 35px;

    padding: 35px;

    background: white;

    border-left: 4px solid var(--teal);
}

.chat-result h3 {
    max-width: 600px;

    font-size: 31px;

    line-height: 1.05;

    letter-spacing: -1.5px;

    margin-bottom: 18px;
}

.chat-result > p {
    max-width: 650px;

    color: var(--graphite);

    margin-bottom: 28px;
}

.result-solution {
    padding: 22px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.result-solution span {
    color: var(--teal);

    font-size: 8px;

    letter-spacing: 2px;
}

.result-solution strong {
    font-size: 22px;
}

.result-button {
    display: inline-block;

    margin-top: 25px;

    color: var(--teal);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}


/* MOBILE */

@media (max-width: 650px) {

    .chatbot-section {
        padding: 90px 0;
    }

    .chatbot-heading h2 {
        font-size: 46px;

        letter-spacing: -3px;
    }

    .advisor-chat {
        border-radius: 20px;
    }

    .chat-topbar {
        min-height: 75px;

        padding: 0 20px;
    }

    .chat-messages {
        min-height: 500px;

        padding: 25px 18px;
    }

    .message-bubble {
        max-width: 88%;
    }

    .chat-options {
        flex-direction: column;
    }

    .chat-option {
        width: 100%;

        text-align: left;
    }

    .chat-result {
        padding: 25px 20px;
    }

}

/* =========================================================
   CHAT LEAD FORM
   ========================================================= */

.result-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.chat-lead-form {
    margin-top: 35px;

    padding-top: 35px;

    border-top:
        1px solid var(--border);

    display: flex;
    flex-direction: column;

    gap: 22px;
}

.lead-form-header {
    margin-bottom: 10px;
}

.lead-form-header > span {
    display: block;

    margin-bottom: 10px;

    color: var(--teal);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;
}

.lead-form-header h4 {
    max-width: 520px;

    font-size: 28px;

    line-height: 1.05;

    letter-spacing: -1px;

    margin-bottom: 10px;
}

.lead-form-header p {
    max-width: 560px;

    color: var(--graphite);

    font-size: 14px;
}


.chat-form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


.chat-field {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


.chat-field label {
    color: var(--navy);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.chat-field input {
    width: 100%;

    padding: 13px 3px;

    border: 0;

    border-bottom:
        1px solid var(--light);

    outline: none;

    background: transparent;

    color: var(--navy);
}


.chat-field input:focus {
    border-color: var(--teal);
}


.chat-privacy {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    color: var(--graphite);

    font-size: 11px;

    cursor: pointer;
}


.chat-privacy input {
    margin-top: 3px;
}


.chat-submit {
    width: 100%;

    min-height: 62px;

    padding: 0 25px;

    border: 0;

    border-radius: 100px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    background:
        linear-gradient(
            90deg,
            var(--navy),
            var(--teal),
            var(--cyan)
        );

    color: white;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2.5px;

    cursor: pointer;
}


.chat-submit span {
    font-size: 23px;
}


.chat-submit:disabled {
    opacity: .6;

    cursor: wait;
}


.chat-form-error {
    padding: 12px 15px;

    border-left:
        3px solid var(--teal);

    background: var(--ice);

    color: var(--navy);

    font-size: 12px;
}


/* SUCCESS */

.chat-lead-success {
    padding: 20px 0 5px;
}


.success-mark {
    width: 48px;
    height: 48px;

    margin-bottom: 22px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--teal);

    color: white;

    font-size: 20px;
}


.chat-lead-success > span {
    display: block;

    color: var(--teal);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;

    margin-bottom: 12px;
}


.chat-lead-success h4 {
    max-width: 550px;

    font-size: 30px;

    line-height: 1.05;

    letter-spacing: -1.5px;

    margin-bottom: 15px;
}


.chat-lead-success p {
    max-width: 580px;

    color: var(--graphite);

    font-size: 14px;

    white-space: pre-line;
}


.success-footer {
    margin-top: 25px;

    padding-top: 20px;

    border-top:
        1px solid var(--border);

    color: var(--graphite);

    font-size: 8px;

    letter-spacing: 2px;
}


@media (max-width: 650px) {

    .chat-form-row {
        grid-template-columns: 1fr;
    }

    .lead-form-header h4 {
        font-size: 25px;
    }

}

/* =========================================================
   FASE 3 — FORMULÁRIO DE LEAD
   ========================================================= */

.chat-lead-form {
    margin-top: 32px;
    padding-top: 32px;

    border-top: 1px solid rgba(8, 42, 58, 0.12);

    display: flex;
    flex-direction: column;
    gap: 22px;

    width: 100%;
}


/* HEADER */

.lead-form-header {
    margin-bottom: 8px;
}

.lead-form-header > span {
    display: block;

    margin-bottom: 12px;

    color: #079bae;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 3px;

    text-transform: uppercase;
}

.lead-form-header h4 {
    margin: 0 0 10px;

    max-width: 520px;

    color: #062b3d;

    font-size: 28px;
    font-weight: 600;

    line-height: 1.15;

    letter-spacing: -0.7px;
}

.lead-form-header p {
    margin: 0;

    max-width: 600px;

    color: #687985;

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
   CAMPOS
   ========================================================= */

.chat-field {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.chat-field label {
    color: #062b3d;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}

.chat-field input {
    box-sizing: border-box;

    width: 100%;
    height: 54px;

    padding: 0 17px;

    border: 1px solid #dbe4e8;
    border-radius: 8px;

    outline: none;

    background: #ffffff;

    color: #062b3d;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.chat-field input:hover {
    border-color: #b9ccd3;
}

.chat-field input:focus {
    border-color: #079bae;

    box-shadow:
        0 0 0 3px rgba(7, 155, 174, 0.08);

    background: #ffffff;
}


/* =========================================================
   EMAIL + WHATSAPP
   ========================================================= */

.chat-form-row {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   PRIVACIDADE
   ========================================================= */

.chat-privacy {
    display: flex;

    align-items: flex-start;

    gap: 11px;

    padding: 4px 0;

    cursor: pointer;
}

.chat-privacy input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    margin: 1px 0 0;

    border: 1px solid #b9ccd3;
    border-radius: 4px;

    background: #ffffff;

    cursor: pointer;

    position: relative;

    transition: 0.2s ease;
}

.chat-privacy input[type="checkbox"]:checked {
    border-color: #079bae;

    background: #079bae;
}

.chat-privacy input[type="checkbox"]:checked::after {
    content: "✓";

    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -54%);

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}

.chat-privacy span {
    max-width: 620px;

    color: #687985;

    font-size: 12px;

    line-height: 1.6;
}


/* =========================================================
   BOTÃO
   ========================================================= */

.chat-submit {
    box-sizing: border-box;

    width: 100%;
    min-height: 64px;

    margin-top: 4px;

    padding: 0 26px;

    border: none;
    border-radius: 100px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            90deg,
            #062b3d 0%,
            #006c80 48%,
            #08a6ba 100%
        );

    color: #ffffff;

    font-family: inherit;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.chat-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(6, 43, 61, 0.16);
}

.chat-submit:active {
    transform: translateY(0);
}

.chat-submit:disabled {
    opacity: 0.6;

    cursor: wait;

    transform: none;
}

.chat-submit-text {
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2.5px;
}

.chat-submit-arrow {
    font-size: 24px;
    font-weight: 300;
}


/* =========================================================
   ERRO
   ========================================================= */

.chat-form-error {
    padding: 14px 16px;

    border-left: 3px solid #079bae;
    border-radius: 4px;

    background: #f2f7f8;

    color: #062b3d;

    font-size: 12px;

    line-height: 1.5;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.chat-lead-success {
    padding: 12px 0 4px;
}

.success-mark {
    width: 48px;
    height: 48px;

    margin-bottom: 22px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #079bae;

    color: #ffffff;

    font-size: 20px;
    font-weight: 600;
}

.chat-lead-success > span {
    display: block;

    margin-bottom: 12px;

    color: #079bae;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;

    text-transform: uppercase;
}

.chat-lead-success h4 {
    margin: 0 0 15px;

    max-width: 560px;

    color: #062b3d;

    font-size: 30px;
    font-weight: 600;

    line-height: 1.1;

    letter-spacing: -1px;
}

.chat-lead-success p {
    margin: 0;

    max-width: 600px;

    color: #687985;

    font-size: 14px;

    line-height: 1.7;

    white-space: pre-line;
}

.success-footer {
    margin-top: 28px;

    padding-top: 20px;

    border-top: 1px solid #dbe4e8;

    color: #82919a;

    font-size: 9px;

    letter-spacing: 2.5px;
}


/* =========================================================
   RESULT BUTTON
   ========================================================= */

.result-button {
    width: 100%;

    min-height: 58px;

    margin-top: 25px;

    padding: 0 22px;

    border: 1px solid #079bae;
    border-radius: 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: transparent;

    color: #079bae;

    font-family: inherit;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2px;

    cursor: pointer;

    transition: 0.2s ease;
}

.result-button:hover {
    background: #079bae;

    color: #ffffff;
}

.result-button:disabled {
    border-color: #dbe4e8;

    background: #f5f8f9;

    color: #82919a;

    cursor: default;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .chat-lead-form {
        margin-top: 25px;

        padding-top: 25px;

        gap: 18px;
    }

    .chat-form-row {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .lead-form-header h4 {
        font-size: 24px;
    }

    .chat-field input {
        height: 52px;
    }

    .chat-submit {
        min-height: 60px;

        padding: 0 20px;
    }

    .chat-submit-text {
        font-size: 10px;

        letter-spacing: 1.8px;
    }

    .chat-lead-success h4 {
        font-size: 25px;
    }

}

/* =========================================================
   CHAT PRIVACY / LGPD
========================================================= */

.chat-privacy span {
    line-height: 1.55;
}

.chat-privacy-link {
    color: #079bae;

    font-weight: 600;

    text-decoration: underline;

    text-underline-offset: 2px;

    transition: opacity .2s ease;
}

.chat-privacy-link:hover {
    opacity: .7;
}

.chat-privacy-link:focus-visible {
    outline: 2px solid #079bae;

    outline-offset: 3px;

    border-radius: 2px;
}