/* Pequeno ajuste legado do site para Tabs do Spectra. */
.uagb-tabs__wrap .uagb-tabs__body-container.uagb-tabs-body__active {
    display: block !important;
}

/* Botões flutuantes. */
.tactium-fix-chat,
.tactium-fix-whatsapp {
    position: fixed;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99990;
    box-sizing: border-box;
    text-decoration: none;
}
.tactium-fix-chat { bottom: 107px; background: #3C5796; }
.tactium-fix-whatsapp { bottom: 30px; background: #10C044; }
.tactium-fix-chat svg,
.tactium-fix-whatsapp svg { width: 38px; height: 38px; fill: #fff; }

/* Webchat: estilos totalmente escopados para não resetar o CSS do site. */
.tactium-dock {
    position: fixed;
    right: 30px;
    bottom: 0;
    width: 440px;
    max-width: calc(100vw - 60px);
    height: 620px;
    max-height: calc(100vh - 30px);
    background: #3C5796;
    box-shadow: 0 2px 10px rgba(0,0,0,.45);
    display: none;
    z-index: 999980;
    box-sizing: border-box;
}
.tactium-dock-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.tactium-dock-minimize {
    appearance: none;
    border: 0;
    padding: 7px;
    border-radius: 4px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -31px;
    right: 0;
    width: 31px;
    height: 31px;
    cursor: pointer;
    z-index: 2;
}
.tactium-dock-minimize svg { width: 15px; height: 15px; fill: #fff; }
.tactium-dock-bubble { display: none !important; }

@media (max-width: 600px) {
    .tactium-dock {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        width: auto !important;
        max-width: none !important;
        height: min(620px, calc(100dvh - 40px)) !important;
        max-height: calc(100dvh - 40px) !important;
    }
    .tactium-fix-chat,
    .tactium-fix-whatsapp {
        right: 16px;
        width: 58px;
        height: 58px;
        padding: 13px;
    }
    .tactium-fix-chat { bottom: 88px; }
    .tactium-fix-whatsapp { bottom: 20px; }
}

/* ============================================================
   Cookie Consent
   ============================================================ */
/* Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -4px 24px rgba(0,0,0,.08);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 24px;
}

.cookie-banner__text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #000;
    font-weight: 500;
}

.cookie-banner__text a {
    color: var(--wp--preset--color--secondary);
    text-decoration: underline;
    font-weight: bold;
}

.cookie-banner__prefs-link {
    background: none;
    border: none;
    font-weight: bold;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    color: var(--wp--preset--color--secondary);
    text-decoration: underline;
    cursor: pointer;
    line-height: inherit;
}

.cookie-banner__actions {
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    align-items: center;
}

.cookie-banner__accept, .cookie-banner__reject {
    flex-shrink: 0;
    border-radius: 100px;
    padding: 14px 50px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cookie-banner__accept {
    background: var(--wp--preset--color--secondary);
    color: #fff;
    border: 1px solid var(--wp--preset--color--secondary);
}

.cookie-banner__accept:hover {
    transform: scale(1.05);
}

.cookie-banner__reject {
    background: transparent;
    color: var(--wp--preset--color--secondary);
    border: 1px solid var(--wp--preset--color--secondary);
}

.cookie-banner__reject:hover {
    transform: scale(1.05);
}

/* Modal */
.cookie-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-modal.is-open {
    display: flex;
}

.cookie-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

.cookie-modal__box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    z-index: 1;
}

.cookie-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .2s, background .2s;
}


.cookie-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-right: 32px;
}

.cookie-modal__desc {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
    font-weight: 400;
}

.cookie-modal__desc a {
    font-weight: bold;
    text-decoration: underline;
}

.cookie-modal__options {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cookie-option__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.cookie-option__desc {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
}

/* Toggle switch */
.cookie-toggle {
    flex-shrink: 0;
    display: inline-flex;
    cursor: pointer;
}

.cookie-toggle--disabled {
    cursor: default;
    opacity: .6;
}

.cookie-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cookie-toggle__track {
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #ddd;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}

.cookie-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s;
}

.cookie-toggle input:checked + .cookie-toggle__track {
    background: var(--wp--preset--color--secondary);
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
    transform: translateX(20px);
}

.cookie-modal__save {
    display: block;
    width: 100%;
    background: var(--wp--preset--color--secondary);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 18px 24px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    font-weight: bold;
    transition: background .2s;
    transition: all 0.15s ease;
}

.cookie-modal__save:hover {
    transform: scale(1.05);
}

@media (max-width: 639px) {
    .cookie-banner__actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-banner__accept {
        order: 1;
    }

    .cookie-banner__text {
        font-size: 13px;
        line-height: 18px;
        margin-bottom: 7px;
    }

    .cookie-banner__reject {
        order: 2;
        width: 100%;
    }

    .cookie-banner__accept, .cookie-banner__reject {
        font-size: 14px;
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .cookie-banner__accept {
        width: 100%;
        text-align: center;
    }

    .cookie-modal__box {
        padding: 24px 20px;
    }
}
