/* Assistente Especialista em Coluna - CSS (Botão Maior + Elevado para Paridade com o Instagram) */
#ec-chat-widget, #ec-chat-widget * {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Posicionamento do Widget: Elevado mais para cima (bottom: 35px) */
#ec-chat-widget {
    position: fixed;
    bottom: 35px !important;
    right: 20px !important;
    z-index: 99990 !important;
    display: flex;
    align-items: center;
}

/* Botão Flutuante EXPANDIDO (MAIOR): height 52px, fonte 15.5px, padding 0 24px */
.ec-chat-btn {
    background-color: #0e5484;
    color: #ffffff !important;
    border: none;
    height: 52px !important;
    padding: 0 24px !important;
    border-radius: 28px !important;
    box-shadow: 0 6px 20px rgba(14, 84, 132, 0.42);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    transition: all 0.25 ease;
    line-height: 1 !important;
}

.ec-chat-btn:hover {
    background-color: #093c60;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 84, 132, 0.5);
}

.ec-chat-btn svg {
    flex-shrink: 0;
    display: block;
}

/* Quando o painel está ABERTO, sobrepõe a tela inteira (z-index: 99999999) */
.ec-chat-panel {
    position: fixed;
    width: 440px;
    max-width: 95vw;
    height: 670px;
    max-height: 88vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    z-index: 99999999 !important;
}

.ec-hidden { display: none !important; }

.ec-chat-header {
    background: #0e5484;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ec-chat-header-info h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.2;
}

.ec-chat-header-info p {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #e0f0fc !important;
    opacity: 0.95;
}

.ec-close-btn {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #ffffff !important;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-close-btn:hover {
    background: rgba(255,255,255,0.35);
}

.ec-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
    -webkit-overflow-scrolling: touch;
}

.ec-welcome-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.ec-card-tag {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: #0e5484;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ec-welcome-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #1e293b;
}

.ec-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
    max-width: 92%;
    word-break: break-word;
}

.ec-bot-message {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ec-user-message {
    background: #0e5484;
    color: #ffffff !important;
    align-self: flex-end;
}

.ec-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.ec-shortcut-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0e5484 !important;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ec-shortcut-btn:hover {
    background: #0e5484;
    color: #ffffff !important;
    border-color: #0e5484;
}

.ec-response-links-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.ec-response-links-box p.ec-links-title {
    font-size: 12px;
    font-weight: 700;
    color: #0e5484;
    margin: 0 0 6px 0;
}

.ec-treatment-list {
    margin: 0 0 8px 0;
    padding-left: 18px;
    font-size: 13px;
}

.ec-treatment-list li {
    margin-bottom: 4px;
}

.ec-treatment-list a {
    color: #0e5484 !important;
    font-weight: 600;
    text-decoration: underline;
}

.ec-attendant-btn-trigger {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: #10b981;
    color: #ffffff !important;
    text-align: center;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: background 0.2s ease;
}

.ec-attendant-btn-trigger:hover {
    background: #059669;
}

.ec-chat-privacy-notice {
    padding: 6px 16px;
    font-size: 11px;
    color: #64748b;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ec-chat-footer {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    background: #ffffff;
    gap: 8px;
    flex-shrink: 0;
    border-top: 1px solid #e2e8f0;
}

.ec-input-wrapper {
    width: 100%;
}

.ec-chat-footer textarea {
    width: 100% !important;
    min-height: 52px;
    max-height: 100px;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    outline: none !important;
    resize: none !important;
    line-height: 1.4;
}

.ec-chat-footer textarea:focus {
    border-color: #0e5484 !important;
    background: #ffffff !important;
}

.ec-send-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.ec-send-btn {
    width: 100% !important;
    background: #0e5484 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 11px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
}

.ec-send-btn:hover {
    background: #093c60 !important;
}

.ec-chat-subfooter {
    padding: 8px 16px 10px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    text-align: left;
    flex-shrink: 0;
}

.ec-subfooter-links {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12.5px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.ec-subfooter-links a {
    color: #0e5484 !important;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.ec-divider { color: #cbd5e1; }

.ec-disclaimer {
    margin: 0;
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.3;
}

.ec-embedded-form-modal {
    position: absolute;
    top: 55px;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 20;
    padding: 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ec-embedded-form-header h4 {
    margin: 0 0 6px 0;
    color: #1e293b;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.ec-embedded-form-header p {
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.45;
}

.ec-cf7-container form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ec-cf7-container input[type="text"],
.ec-cf7-container input[type="email"],
.ec-cf7-container input[type="tel"],
.ec-cf7-container select,
.ec-cf7-container textarea {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
    outline: none !important;
}

.ec-cf7-container input[type="submit"],
.ec-cf7-container button[type="submit"],
.ec-cf7-container .wpcf7-submit {
    width: 100% !important;
    background: #38bdf8 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 13px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
    margin-top: 10px;
}

.ec-form-footer-action {
    margin-top: 14px;
}

.ec-cancel-form-btn {
    width: 100% !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 10px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    text-align: center !important;
}

/* ==========================================================================
   📱 ADAPTAÇÃO MOBILE (SMARTPHONES) - POSIÇÃO ELEVADA E BOTÃO EXPANDIDO
   ========================================================================== */
@media (max-width: 650px) {
    /* Botão FECHADO: Elevação para bottom: 35px no celular para casar exata linha do Instagram */
    #ec-chat-widget {
        bottom: 35px !important;
        right: 16px !important;
        left: auto !important;
        z-index: 99990 !important;
        display: flex !important;
        align-items: center !important;
    }

    .ec-chat-btn {
        height: 50px !important;
        padding: 0 20px !important;
        font-size: 15px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Painel ABERTO: preenche a tela inteira (100dvh) e sobrepõe TUDO na tela (z-index: 99999999) */
    .ec-chat-panel {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 99999999 !important;
        margin: 0 !important;
    }

    .ec-chat-header {
        padding: 12px 16px !important;
    }

    .ec-chat-body {
        padding: 12px !important;
    }

    .ec-chat-footer {
        padding: 10px 12px !important;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .ec-chat-subfooter {
        padding: 8px 12px !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .ec-embedded-form-modal {
        padding: 16px !important;
    }
}
