/* ==========================================================================
   Formulário de contato: honeypot, feedback e modal de sucesso.
   Carregado nas páginas que exibem o formulário (home e consultoria).
   ========================================================================== */

/* Campo armadilha: precisa existir no DOM sem aparecer nem receber foco. */
.tb-hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Mensagens de erro/aviso abaixo do formulário */
.tb-form-feedback {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    min-height: 0;
}

.tb-form-feedback:empty {
    display: none;
}

.tb-form-feedback.is-error {
    color: #ff8080;
}

.tb-form-feedback.is-info {
    color: #99ce2a;
}

/* --------------------------------------------------------------------------
   Modal de sucesso
   -------------------------------------------------------------------------- */

body.tb-modal-open {
    overflow: hidden;
}

.tb-success-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tb-success-modal[hidden] {
    display: none !important;
}

.tb-success-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 24, .72);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .25s ease;
}

.tb-success-modal.is-open .tb-success-backdrop {
    opacity: 1;
}

.tb-success-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 18px;
    padding: 44px 36px 34px;
    text-align: center;
    box-shadow: 0 26px 70px rgba(10, 15, 28, .38);
    transform: translateY(18px) scale(.97);
    opacity: 0;
    transition: transform .28s cubic-bezier(.2, .8, .3, 1), opacity .28s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.tb-success-modal.is-open .tb-success-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.tb-success-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #9aa1b4;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color .2s ease, background .2s ease;
}

.tb-success-close:hover,
.tb-success-close:focus-visible {
    color: #1a1a2e;
    background: #f1f3f7;
    outline: none;
}

.tb-success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #99ce2a, #7bb82a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 26px rgba(153, 206, 42, .32);
}

.tb-success-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.25;
}

.tb-success-text {
    margin: 0 0 26px;
    font-size: 15px;
    line-height: 1.7;
    color: #4a4f66;
}

.tb-success-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
}

.tb-success-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1a2e;
    background: #f1f3f7;
    border: 1px solid #e3e7ee;
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.tb-success-social a:hover,
.tb-success-social a:focus-visible {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #99ce2a, #7bb82a);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 22px rgba(153, 206, 42, .3);
    outline: none;
}

.tb-success-gallery {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #5f9a12;
    text-decoration: none;
    border-bottom: 1px solid rgba(95, 154, 18, .35);
    padding-bottom: 2px;
    transition: color .2s ease, border-color .2s ease;
}

.tb-success-gallery::after {
    content: '→';
    font-size: 16px;
}

.tb-success-gallery:hover,
.tb-success-gallery:focus-visible {
    color: #1a1a2e;
    border-color: #1a1a2e;
    outline: none;
}

.tb-success-dismiss {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 13px 20px;
    border: 1px solid #e3e7ee;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4f66;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.tb-success-dismiss:hover,
.tb-success-dismiss:focus-visible {
    background: #f7f9fb;
    border-color: #cfd6e2;
    color: #1a1a2e;
    outline: none;
}

@media (max-width: 575px) {
    .tb-success-card {
        padding: 38px 22px 26px;
    }

    .tb-success-title {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tb-success-backdrop,
    .tb-success-card {
        transition: none;
    }
}
