/**
 * ============================================
 * WHATSAPP LEAD CAPTURE WIDGET - ESTILOS
 * ============================================
 */

/* Reset e Base */
.wwl-widget *,
.wwl-widget *::before,
.wwl-widget *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Container Principal */
.wwl-widget {
    position: fixed;
    bottom: var(--wwl-bottom-offset, 20px);
    right: var(--wwl-side-offset, 20px);
    z-index: var(--wwl-z-index, 999999);
    font-size: 14px;
    line-height: 1.4;
}

.wwl-widget.wwl-left {
    right: auto;
    left: var(--wwl-side-offset, 20px);
}

/* ==========================================
   BOTÃO FLUTUANTE
   ========================================== */

.wwl-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 20px rgba(37, 211, 102, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    animation: wwl-tilt 2.5s ease-in-out infinite;
}

.wwl-button:hover {
    transform: scale(1.12);
    box-shadow:
        0 8px 30px rgba(37, 211, 102, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.2);
    animation: none;
}

.wwl-button:active {
    transform: scale(1.05);
}

/* Animação de tilt + bounce */
@keyframes wwl-tilt {
    0%        { transform: translateY(0) rotate(0deg); }
    10%       { transform: translateY(-3px) rotate(-8deg); }
    20%       { transform: translateY(-5px) rotate(6deg); }
    30%       { transform: translateY(-3px) rotate(-5deg); }
    40%       { transform: translateY(-1px) rotate(3deg); }
    50%       { transform: translateY(0) rotate(0deg); }
    100%      { transform: translateY(0) rotate(0deg); }
}

/* Ícone do WhatsApp */
.wwl-button-icon {
    width: 36px;
    height: 36px;
    fill: #FFFFFF;
    transition: transform 0.3s ease;
}

.wwl-button:hover .wwl-button-icon {
    transform: rotate(15deg) scale(1.05);
}

/* Animação Pulse */
.wwl-button.wwl-pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: wwl-pulse 1.5s ease-out infinite;
    z-index: -1;
}

.wwl-button.wwl-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: wwl-pulse 1.5s ease-out infinite 0.75s;
    z-index: -1;
}

@keyframes wwl-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Badge de Notificação */
.wwl-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    background: #FF3B30;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
    transform: scale(0);
}

.wwl-badge.wwl-show {
    animation: wwl-badge-pop 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.wwl-badge.wwl-pop {
    animation: wwl-badge-pop 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes wwl-badge-pop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.35); }
    80%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ==========================================
   BALÃO DE PREVIEW (Mensagens Empilhadas)
   ========================================== */

.wwl-preview {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 280px;
    max-width: calc(100vw - 100px);
    opacity: 0;
    transform: translateY(10px);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wwl-preview.wwl-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wwl-preview-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wwl-preview-msg {
    background: #FFFFFF;
    border-radius: 12px 12px 4px 12px;
    padding: 10px 14px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.wwl-preview-msg.wwl-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wwl-preview-msg:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

.wwl-preview-msg:last-child::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #FFFFFF;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

.wwl-preview-msg-text {
    color: #1F2937;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
}

.wwl-preview-msg-time {
    color: #8696A0;
    font-size: 11px;
    text-align: right;
    margin-top: 4px;
}

.wwl-widget.wwl-left .wwl-preview {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

.wwl-widget.wwl-left .wwl-preview-msg {
    border-radius: 12px 12px 12px 4px;
}

.wwl-widget.wwl-left .wwl-preview-msg:last-child::after {
    right: auto;
    left: 20px;
}

/* ==========================================
   JANELA DO CHAT
   ========================================== */

.wwl-chat {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
}

.wwl-chat.wwl-open {
    display: flex;
    animation: wwl-chat-open 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wwl-chat-open {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wwl-widget.wwl-left .wwl-chat {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

/* ==========================================
   HEADER DO CHAT
   ========================================== */

.wwl-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    margin-top: -1px;
}

.wwl-header-back {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.wwl-header-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wwl-header-back svg {
    width: 24px;
    height: 24px;
    fill: #FFFFFF;
}

.wwl-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.wwl-avatar-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #25D366 0%, #00E676 50%, #25D366 100%);
    animation: wwl-ring-rotate 3s linear infinite;
}

@keyframes wwl-ring-rotate {
    0% {
        background: linear-gradient(0deg, #25D366 0%, #00E676 50%, #25D366 100%);
    }
    50% {
        background: linear-gradient(180deg, #25D366 0%, #00E676 50%, #25D366 100%);
    }
    100% {
        background: linear-gradient(360deg, #25D366 0%, #00E676 50%, #25D366 100%);
    }
}

.wwl-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #DFE5E7;
    border: 2px solid #075E54;
}

.wwl-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #25D366;
    border: 2px solid #075E54;
    border-radius: 50%;
}

.wwl-status-dot.wwl-offline {
    background: #667781;
}

.wwl-header-info {
    flex: 1;
    min-width: 0;
}

.wwl-header-name {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wwl-header-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wwl-header-menu {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.wwl-header-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wwl-header-menu svg {
    width: 20px;
    height: 20px;
    fill: #FFFFFF;
}

/* ==========================================
   MENU DROPDOWN (3 pontinhos)
   ========================================== */

.wwl-dropdown-menu {
    position: absolute;
    top: 60px;
    right: 12px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 200;
    animation: wwl-dropdown-in 0.2s ease;
}

.wwl-dropdown-menu.wwl-hidden {
    display: none;
}

@keyframes wwl-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wwl-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #303030;
    text-align: left;
    transition: background 0.15s;
}

.wwl-dropdown-item:hover {
    background: #F5F5F5;
}

.wwl-dropdown-item svg {
    flex-shrink: 0;
    color: #667781;
}

.wwl-dropdown-item:hover svg {
    color: #25D366;
}

.wwl-dropdown-close {
    color: #E74C3C;
}

.wwl-dropdown-close svg {
    color: #E74C3C;
}

.wwl-dropdown-close:hover {
    background: #FEF2F2;
}

.wwl-dropdown-close:hover svg {
    color: #E74C3C;
}

.wwl-dropdown-divider {
    height: 1px;
    background: #E5E5E5;
    margin: 4px 0;
}

/* ==========================================
   ÁREA DE MENSAGENS
   ========================================== */

.wwl-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    background-color: #E5DDD5;
    background-image: url("../images/whatsapp_background.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.wwl-messages::-webkit-scrollbar {
    width: 6px;
}

.wwl-messages::-webkit-scrollbar-track {
    background: transparent;
}

.wwl-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* ==========================================
   BALÕES DE MENSAGEM
   ========================================== */

.wwl-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: wwl-message-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wwl-message-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wwl-message.wwl-bot {
    align-self: flex-start;
}

.wwl-message.wwl-user {
    align-self: flex-end;
}

.wwl-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wwl-message.wwl-bot .wwl-bubble {
    background: #FFFFFF;
    border-top-left-radius: 0;
}

.wwl-message.wwl-user .wwl-bubble {
    background: #DCF8C6;
    border-top-right-radius: 0;
}

.wwl-message.wwl-bot .wwl-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-right: 8px solid #FFFFFF;
    border-bottom: 8px solid transparent;
}

.wwl-message.wwl-user .wwl-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #DCF8C6;
    border-bottom: 8px solid transparent;
}

.wwl-bubble-text {
    color: #303030;
    font-size: 14.5px;
    line-height: 1.5;
}

.wwl-bubble-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.wwl-bubble-time {
    color: #667781;
    font-size: 11px;
}

.wwl-bubble-status {
    display: flex;
    align-items: center;
}

.wwl-bubble-status svg {
    width: 16px;
    height: 16px;
    fill: #667781;
}

.wwl-bubble-status.wwl-read svg {
    fill: #53BDEB;
}

/* ==========================================
   MENSAGEM COM BOTÕES (WhatsApp Business API)
   ========================================== */

.wwl-bubble-interactive {
    padding: 0;
    overflow: hidden;
}

.wwl-bubble-interactive .wwl-bubble-text {
    padding: 10px 12px 8px;
    font-size: 14.5px;
    line-height: 1.4;
}

.wwl-bubble-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #F8F9FA;
    border-top: 1px solid #E5E5E5;
}

.wwl-bubble-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 2px solid #25D366;
    border-radius: 12px;
    color: #25D366;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.wwl-bubble-btn:hover {
    background: #25D366;
    color: #FFFFFF;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.wwl-bubble-btn:hover svg {
    fill: #FFFFFF;
}

.wwl-bubble-btn:active {
    transform: scale(0.98);
}

.wwl-bubble-btn svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.wwl-bubble-btn-primary {
    background: #25D366;
    color: #FFFFFF;
    font-weight: 700;
    animation: wwl-btn-pulse 2s infinite;
}

.wwl-bubble-btn-primary svg {
    fill: #FFFFFF;
}

.wwl-bubble-btn-primary:hover {
    background: #128C7E;
    border-color: #128C7E;
    color: #FFFFFF;
}

@keyframes wwl-btn-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
}

@keyframes wwl-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.wwl-bubble-btn.wwl-clicked {
    background: #25D366;
    color: #FFFFFF;
}

.wwl-bubble-btn.wwl-cooldown {
    opacity: 0.7;
    pointer-events: none;
}

.wwl-bubble-btn.wwl-clicked svg {
    fill: #FFFFFF;
}

.wwl-bubble-interactive .wwl-bubble-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 8px;
    background: #FAFAFA;
    border-top: 1px solid #E5E5E5;
}

.wwl-bubble-countdown {
    font-size: 11px;
    color: #667781;
}

.wwl-bubble-countdown strong {
    color: #25D366;
    font-weight: 600;
}

.wwl-choice-message {
    animation: wwl-choice-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wwl-choice-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   SELECT OPTIONS (Opções de escolha)
   ========================================== */

.wwl-select-options {
    align-self: stretch;
    max-width: 100%;
    animation: wwl-message-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wwl-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.wwl-option-btn {
    background: #FFFFFF;
    border: 1.5px solid #25D366;
    border-radius: 20px;
    color: #128C7E;
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.wwl-option-btn:hover {
    background: #25D366;
    color: #FFFFFF;
    border-color: #25D366;
    transform: translateX(4px);
}

.wwl-option-btn:active {
    transform: translateX(2px) scale(0.98);
}

/* ==========================================
   INDICADOR DIGITANDO
   ========================================== */

.wwl-typing {
    display: flex;
    align-self: flex-start;
    max-width: 85%;
    animation: wwl-message-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wwl-typing-bubble {
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    border-top-left-radius: 0;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wwl-typing-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-right: 8px solid #FFFFFF;
    border-bottom: 8px solid transparent;
}

.wwl-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.wwl-typing-dot {
    width: 8px;
    height: 8px;
    background: #667781;
    border-radius: 50%;
    animation: wwl-typing-bounce 1.4s infinite ease-in-out;
}

.wwl-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.wwl-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes wwl-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   ÁREA DE INPUT
   ========================================== */

.wwl-input-area {
    background: #F0F0F0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wwl-input {
    flex: 1;
    background: #FFFFFF;
    border-radius: 21px;
    padding: 10px 16px;
    min-height: 44px;
    max-height: 100px;
    font-size: 15px;
    color: #303030;
    line-height: 1.4;
    overflow-y: auto;
    word-break: break-word;
    white-space: pre-wrap;
    cursor: text;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wwl-input:empty::before {
    content: attr(data-placeholder);
    color: #8696A0;
    pointer-events: none;
}

.wwl-input[contenteditable="false"],
.wwl-input.wwl-input-disabled {
    cursor: default;
    pointer-events: none;
    color: #8696A0;
}


.wwl-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.wwl-send-btn:hover:not(:disabled) {
    background: #22C35E;
    transform: scale(1.05);
}

.wwl-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.wwl-send-btn:disabled {
    background: #CCD0D5;
    cursor: not-allowed;
    box-shadow: none;
}

.wwl-send-btn svg {
    width: 22px;
    height: 22px;
    fill: #FFFFFF;
    margin-left: 2px;
}

/* ==========================================
   MENSAGEM DE ERRO
   ========================================== */

.wwl-error {
    background: #FFF3F3;
    border-left: 3px solid #FF3B30;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 0 8px 8px 0;
    animation: wwl-shake 0.5s ease;
}

.wwl-error-text {
    color: #FF3B30;
    font-size: 13px;
}

/* ==========================================
   RESPONSIVO
   ========================================== */

@media (max-width: 480px) {
    .wwl-widget {
        bottom: 15px;
        right: 15px;
    }

    .wwl-widget.wwl-left {
        left: 15px;
    }

    .wwl-button {
        width: 64px;
        height: 64px;
    }

    .wwl-button-icon {
        width: 32px;
        height: 32px;
    }

    .wwl-chat {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        bottom: calc(100% + 10px);
    }

    .wwl-messages {
        padding: 10px 12px;
    }

    .wwl-message {
        max-width: 90%;
    }
}

@media (max-width: 380px) {
    .wwl-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .wwl-avatar-ring {
        width: 42px;
        height: 42px;
    }

    .wwl-header-name {
        font-size: 15px;
    }

    .wwl-header-status {
        font-size: 12px;
    }
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */

.wwl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Bloqueia o outline global do style.css (:focus-visible) dentro do widget */
.wwl-widget *:focus,
.wwl-widget *:focus-visible,
.wwl-widget *:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

/* Exceção: sombra verde no campo de input quando ativo */
.wwl-widget .wwl-input:focus,
.wwl-widget .wwl-input[contenteditable="true"]:focus {
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.45) !important;
}


@media (prefers-reduced-motion: reduce) {
    .wwl-button {
        animation: none !important;
    }

    .wwl-button.wwl-pulse::before,
    .wwl-button.wwl-pulse::after {
        animation: none;
    }

    .wwl-typing-dot {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }

    .wwl-avatar-ring {
        animation: none;
        background: linear-gradient(135deg, #25D366 0%, #00E676 100%);
    }

    .wwl-message,
    .wwl-typing,
    .wwl-chat,
    .wwl-badge,
    .wwl-preview {
        animation: none;
        transition: none;
    }
}

/* ==========================================
   LGPD / CONSENTIMENTO
   ========================================== */

.wwl-consent-area {
    background: #F0F2F5;
    border-top: 1px solid #E0E0E0;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.wwl-consent-area.wwl-hidden {
    display: none;
}

.wwl-consent-form {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wwl-consent-form.wwl-hidden {
    display: none;
}

.wwl-consent-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

.wwl-consent-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.wwl-consent-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid #667781;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wwl-consent-check::after {
    content: '';
    width: 4px;
    height: 7px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-bottom: 1px;
}

.wwl-consent-input:checked + .wwl-consent-check {
    background: #25D366;
    border-color: #25D366;
}

.wwl-consent-input:checked + .wwl-consent-check::after {
    transform: rotate(45deg) scale(1);
}

.wwl-consent-checkbox:hover .wwl-consent-check {
    border-color: #25D366;
}

.wwl-consent-label {
    font-size: 10px;
    color: #505050;
    line-height: 1;
}

.wwl-privacy-link {
    background: none;
    border: none;
    color: #128C7E;
    font-size: 9px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.wwl-privacy-link:hover {
    color: #075E54;
}

.wwl-consent-confirmed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #25D366;
    font-size: 10px;
    font-weight: 600;
    animation: wwl-fade-in 0.3s ease;
}

.wwl-consent-confirmed.wwl-hidden {
    display: none;
}

.wwl-consent-confirmed svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

@keyframes wwl-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal de Privacidade */
.wwl-privacy-modal {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wwl-privacy-modal.wwl-show {
    opacity: 1;
    visibility: visible;
}

.wwl-privacy-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.wwl-privacy-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    max-width: 500px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wwl-privacy-modal.wwl-show .wwl-privacy-content {
    transform: translateY(0) scale(1);
}

.wwl-privacy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5E5;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    border-radius: 16px 16px 0 0;
}

.wwl-privacy-header h2 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.wwl-privacy-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    transition: background 0.2s;
}

.wwl-privacy-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wwl-privacy-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    color: #303030;
    line-height: 1.6;
}

.wwl-privacy-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #075E54;
    margin: 16px 0 8px 0;
}

.wwl-privacy-body h3:first-child {
    margin-top: 0;
}

.wwl-privacy-body p {
    margin: 0 0 12px 0;
}

.wwl-privacy-body ul {
    margin: 8px 0 12px 0;
    padding-left: 20px;
}

.wwl-privacy-body li {
    margin: 6px 0;
}

.wwl-privacy-footer {
    padding: 16px 20px;
    border-top: 1px solid #E5E5E5;
    display: flex;
    justify-content: flex-end;
}

.wwl-privacy-accept {
    background: #25D366;
    color: #FFFFFF;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wwl-privacy-accept:hover {
    background: #22C35E;
    transform: translateY(-1px);
}

.wwl-privacy-accept:active {
    transform: translateY(0);
}

.wwl-privacy-body::-webkit-scrollbar {
    width: 6px;
}

.wwl-privacy-body::-webkit-scrollbar-track {
    background: transparent;
}

.wwl-privacy-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

@media (max-width: 480px) {
    .wwl-consent-area {
        padding: 3px 8px;
        min-height: 24px;
    }

    .wwl-consent-form {
        gap: 4px;
    }

    .wwl-consent-label {
        font-size: 9px;
    }

    .wwl-privacy-link {
        font-size: 8px;
    }

    .wwl-privacy-content {
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }

    .wwl-privacy-header {
        border-radius: 12px 12px 0 0;
        padding: 14px 16px;
    }

    .wwl-privacy-header h2 {
        font-size: 15px;
    }

    .wwl-privacy-body {
        padding: 16px;
    }

    .wwl-privacy-footer {
        padding: 12px 16px;
    }
}
