/* Atipik Chatbot Styles */
:root {
    --chat-primary: #001659;
    --chat-accent: #d4af37;
    --chat-bg: rgba(255, 255, 255, 0.85);
    --chat-text: #1a1a1a;
    --chat-radius: 16px;
    --chat-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Trigger Button */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--chat-primary), #0a2e8c);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 22, 89, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-trigger:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 22, 89, 0.4);
}

.trigger-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--chat-accent);
    opacity: 0;
    animation: chat-pulse 2s infinite;
}

@keyframes chat-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    max-height: 80vh;
    background: var(--chat-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--chat-radius);
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Header */
.chatbot-header {
    background: var(--chat-primary);
    padding: 15px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 4px;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #4caf50;
    border: 2px solid var(--chat-primary);
    border-radius: 50%;
}

.bot-details h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    color: white;
}

.bot-details p {
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.chatbot-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.3);
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: msg-fade-in 0.3s ease;
}

@keyframes msg-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: var(--chat-text);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message.user {
    align-self: flex-end;
    background: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-time {
    font-size: 10px;
    margin-top: 5px;
    display: block;
    opacity: 0.6;
}

.message.user .message-time {
    text-align: right;
    color: rgba(255,255,255,0.7);
}

/* Input Area */
.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
}

#chatbot-form {
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

#chatbot-input:focus {
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(0, 22, 89, 0.05);
}

#chatbot-send {
    width: 40px;
    height: 40px;
    background: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

#chatbot-send:hover {
    background: var(--chat-accent);
    transform: rotate(-15deg) scale(1.1);
}

/* Typing Indicator */
.typing {
    font-style: italic;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    display: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .chatbot-window {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 90px;
        height: 60vh;
    }
    .chatbot-trigger {
        bottom: 20px;
        right: 20px;
    }
}
