/* =========================================================
   MEW DESPACHO - COMPONENTES GLOBAIS
   Caminho:
   domains/mewdespacho.com.br/public_html/mew-despacho/assets/css/mew-componentes.css

   Contém os estilos de:
   - Rodapé
   - Chatbot
   - Banner de cookies
   ========================================================= */


/* ===================== RODAPÉ ===================== */

.mew-footer {
    background: #111827;
    color: #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 40px;
}

.mew-footer-area {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 18px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 22px;
}

.mew-footer h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
}

.mew-footer p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 14px;
}

.mew-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mew-footer li {
    margin-bottom: 8px;
}

.mew-footer a {
    color: #dbeafe;
    text-decoration: none;
    font-size: 14px;
}

.mew-footer a:hover {
    text-decoration: underline;
}

.mew-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 14px 18px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

@media (max-width: 800px) {
    .mew-footer-area {
        grid-template-columns: 1fr;
    }
}


/* ===================== CHATBOT ==================== */

#mewChatbotRoot,
    #mewChatbotRoot * {
        box-sizing: border-box;
    }

    #mewChatbotRoot {
        position: fixed;
        right: 20px;
        bottom: 20px;
        z-index: 99999;
        font-family: Arial, Helvetica, sans-serif;
    }

    .mew-chatbot-button {
        width: 62px;
        height: 62px;
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        display: grid;
        place-items: center;
        background: linear-gradient(135deg, #2563eb, #1e3a8a);
        color: #fff;
        font-size: 28px;
        box-shadow: 0 14px 32px rgba(15, 23, 42, .28);
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .mew-chatbot-button:hover {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 18px 38px rgba(15, 23, 42, .34);
    }

    .mew-chatbot-panel {
        position: absolute;
        right: 0;
        bottom: 76px;
        width: min(380px, calc(100vw - 32px));
        height: min(560px, calc(100vh - 120px));
        display: none;
        flex-direction: column;
        overflow: hidden;
        background: #fff;
        border: 1px solid #dbe3ef;
        border-radius: 22px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    }

    .mew-chatbot-panel.is-open {
        display: flex;
    }

    .mew-chatbot-header {
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: #fff;
        background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    }

    .mew-chatbot-avatar {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: rgba(255, 255, 255, .16);
        border: 1px solid rgba(255, 255, 255, .22);
        font-size: 22px;
    }

    .mew-chatbot-title {
        min-width: 0;
        flex: 1;
    }

    .mew-chatbot-title strong {
        display: block;
        font-size: 15px;
    }

    .mew-chatbot-title small {
        display: block;
        margin-top: 2px;
        opacity: .86;
        font-size: 11px;
    }

    .mew-chatbot-close {
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 10px;
        cursor: pointer;
        color: #fff;
        background: rgba(255, 255, 255, .14);
        font-size: 22px;
    }

    .mew-chatbot-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        background: #f8fafc;
    }

    .mew-chatbot-msg {
        max-width: 88%;
        margin: 0 0 10px;
        padding: 11px 13px;
        border-radius: 15px;
        font-size: 13px;
        line-height: 1.45;
        word-wrap: break-word;
    }

    .mew-chatbot-msg.bot {
        margin-right: auto;
        color: #0f172a;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-bottom-left-radius: 5px;
    }

    .mew-chatbot-msg.user {
        margin-left: auto;
        color: #fff;
        background: #2563eb;
        border-bottom-right-radius: 5px;
    }

    .mew-chatbot-options {
        display: grid;
        gap: 8px;
        margin: 12px 0 2px;
    }

    .mew-chatbot-option {
        width: 100%;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        padding: 10px 12px;
        cursor: pointer;
        text-align: left;
        color: #0f172a;
        background: #fff;
        font-size: 12px;
        font-weight: 700;
        transition: background .18s ease, border-color .18s ease;
    }

    .mew-chatbot-option:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

    .mew-chatbot-option.acao {
        color: #1d4ed8;
        border-color: #93c5fd;
        background: #eff6ff;
    }

    .mew-chatbot-option.voltar {
        color: #475569;
        background: #f8fafc;
    }

    .mew-chatbot-footer {
        padding: 12px;
        border-top: 1px solid #e2e8f0;
        background: #fff;
    }

    .mew-chatbot-input-row {
        display: flex;
        gap: 8px;
    }

    .mew-chatbot-input {
        min-width: 0;
        flex: 1;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        padding: 10px 12px;
        outline: 0;
        font: inherit;
        font-size: 13px;
    }

    .mew-chatbot-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
    }

    .mew-chatbot-send {
        width: 44px;
        flex: 0 0 44px;
        border: 0;
        border-radius: 12px;
        cursor: pointer;
        color: #fff;
        background: #2563eb;
        font-size: 18px;
    }

    .mew-chatbot-hint {
        margin-top: 7px;
        color: #64748b;
        font-size: 10px;
        text-align: center;
    }

    @media (max-width: 520px) {
        #mewChatbotRoot {
            right: 12px;
            bottom: 12px;
        }

        .mew-chatbot-panel {
            position: fixed;
            left: 12px;
            right: 12px;
            bottom: 86px;
            width: auto;
            height: min(520px, calc(100vh - 110px));
        }
    }


/* ===================== COOKIES ==================== */

.cookie-mew-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 999999;
    display: none;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
}

.cookie-mew-box {
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.cookie-mew-box h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 20px;
}

.cookie-mew-box p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
    font-size: 14px;
}

.cookie-mew-box a {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.cookie-mew-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-mew-btn {
    min-height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 900;
    font-size: 14px;
}

.cookie-mew-btn.azul {
    background: #2563eb;
    color: #ffffff;
}

.cookie-mew-btn.verde {
    background: #16a34a;
    color: #ffffff;
}

.cookie-mew-btn.cinza {
    background: #e5e7eb;
    color: #334155;
}

@media (max-width: 760px) {
    .cookie-mew-box {
        grid-template-columns: 1fr;
    }

    .cookie-mew-actions {
        justify-content: flex-start;
    }

    .cookie-mew-btn {
        width: 100%;
    }
}