/* ==================== ASISTENTE ESPIRITUAL (CHATBOT IA) ==================== */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chatbot-trigger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4), 0 8px 10px -6px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    position: relative;
    padding: 0;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4), 0 10px 10px -10px rgba(37, 99, 235, 0.3);
}

.chatbot-trigger svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
    position: absolute;
    transition: transform 0.4s, opacity 0.4s;
    left: 50%;
    top: 50%;
    margin-left: -14px;
    margin-top: -14px;
}

.chatbot-trigger .icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.chatbot-trigger[aria-expanded="true"] .icon-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.chatbot-trigger[aria-expanded="true"] .icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.chatbot-trigger-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5E2A;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    z-index: 5;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    padding: 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.chatbot-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-status::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.chatbot-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    max-width: 85%;
    line-height: 1.5;
}

.chat-message.bot {
    background: #f1f5f9;
    color: #0f172a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: #2563eb;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input-area input {
    flex: 1;
    border: 2px solid #f1f5f9;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
    border-color: #2563eb;
}

.chatbot-send-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.typing-dots {
    font-weight: bold;
    letter-spacing: 2px;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: -10px;
    }
}
