/* =============================================
   CLAUDIA CHAT WIDGET — Custom Chat
   Estilo 11x.ai "Ask Julian"
   ============================================= */

/* ---- Botão Default do Chatwoot (Ocultar) ---- */
.woot-widget-bubble,
.woot-elements--bubble {
    display: none !important;
}

/* ---- Botão Flutuante Customizado ---- */
.claudia-chat-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 8px 20px 8px 8px;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, sans-serif;
}

.claudia-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(108, 43, 217, 0.3);
    border-color: rgba(108, 43, 217, 0.4);
}

.claudia-chat-btn.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.claudia-chat-btn-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(108, 43, 217, 0.5);
}

.claudia-chat-btn-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ---- Janela do Chat ---- */
.claudia-chat-window {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 400px;
    height: 600px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.claudia-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ---- Header ---- */
.claudia-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.claudia-chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(108, 43, 217, 0.5);
    flex-shrink: 0;
}

.claudia-chat-header-info {
    flex: 1;
    min-width: 0;
}

.claudia-chat-header-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.claudia-chat-header-status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.claudia-chat-header-status::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: claudia-pulse 2s ease-in-out infinite;
}

@keyframes claudia-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.claudia-chat-minimize {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.claudia-chat-minimize:hover {
    color: #ffffff;
}

/* ---- Mensagens ---- */
.claudia-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

.claudia-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.claudia-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.claudia-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Mensagem do Bot */
.claudia-msg-bot {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 85%;
}

.claudia-msg-bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.claudia-msg-bot-bubble {
    background: #ffffff;
    color: #1a1a2e;
    padding: 12px 16px;
    border-radius: 4px 16px 16px 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Mensagem do Usuário */
.claudia-msg-user {
    align-self: flex-end;
    max-width: 80%;
}

.claudia-msg-user-bubble {
    background: #6c2bd9;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    font-size: 14px;
    line-height: 1.5;
}

/* Quick Actions */
.claudia-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.claudia-quick-action-btn {
    background: #ffffff;
    color: #1a1a2e;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}

.claudia-quick-action-btn:hover {
    background: #6c2bd9;
    color: #ffffff;
    border-color: #6c2bd9;
}

/* Typing Indicator */
.claudia-typing {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 85%;
}

.claudia-typing-dots {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.claudia-typing-dot {
    width: 7px;
    height: 7px;
    background: #aaa;
    border-radius: 50%;
    animation: claudia-typing-bounce 1.4s ease-in-out infinite;
}

.claudia-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.claudia-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes claudia-typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ---- Input Area ---- */
.claudia-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    background: #ffffff;
    flex-shrink: 0;
}

.claudia-chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
    outline: none;
    color: #1a1a2e;
    background: #f8f9fa;
    transition: border-color 0.2s;
    resize: none;
    max-height: 80px;
    min-height: 40px;
    line-height: 1.4;
    overflow-y: auto;
}

.claudia-chat-input::placeholder {
    color: #999;
}

.claudia-chat-input:focus {
    border-color: #6c2bd9;
    background: #ffffff;
}

.claudia-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.claudia-chat-send:hover {
    background: #6c2bd9;
    color: #ffffff;
}

.claudia-chat-send.active {
    background: #6c2bd9;
    color: #ffffff;
}

.claudia-chat-send svg {
    width: 18px;
    height: 18px;
}

/* ---- Responsivo ---- */
@media (max-width: 480px) {
    .claudia-chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .claudia-chat-btn {
        bottom: 16px;
        right: 16px;
        padding: 6px 12px 6px 6px;
        transform: scale(0.85);
        /* Reduz tamanho do widget */
    }

    .claudia-chat-btn-text {
        font-size: 12px;
    }
}

/* ---- Modal de Captura de Lead ---- */
.claudia-lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.claudia-lead-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.claudia-lead-modal {
    background: #ffffff;
    width: 90%;
    max-width: 360px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Inter', sans-serif;
    position: relative;
    text-align: center;
}

.claudia-lead-modal-overlay.active .claudia-lead-modal {
    transform: translateY(0);
}

.claudia-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.claudia-modal-close:hover {
    color: #1a1a2e;
}

.claudia-modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid #6c2bd9;
    padding: 2px;
    background: white;
}

.claudia-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.claudia-modal-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.claudia-form-group {
    margin-bottom: 16px;
    text-align: left;
}

.claudia-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.claudia-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    background: #f9fafb;
    color: #1a1a2e;
    box-sizing: border-box;
    /* Garante que o padding não aumente a largura total */
}

.claudia-form-input:focus {
    outline: none;
    border-color: #6c2bd9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 43, 217, 0.1);
}

.claudia-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.claudia-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.claudia-submit-btn:active {
    transform: translateY(0);
}