/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Chat Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #A693AC), var(--secondary-color, #C8E4CA));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.chatbot-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color, #A693AC), var(--secondary-color, #C8E4CA));
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color, #A693AC);
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* Auto-Bot Notice */
.chatbot-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    font-size: 12px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chatbot-notice svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.bot {
    flex-direction: row;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: var(--primary-color, #A693AC);
}

.chatbot-message.user .chatbot-message-avatar {
    background: #6c757d;
}

.chatbot-message-avatar svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chatbot-message.user .chatbot-message-content {
    background: var(--primary-color, #A693AC);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-left: 40px;
}

.chatbot-suggestion {
    background: white;
    border: 1px solid var(--primary-color, #A693AC);
    color: var(--primary-color, #A693AC);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-suggestion:hover {
    background: var(--primary-color, #A693AC);
    color: white;
}

/* Fallback Contacts */
.chatbot-fallback {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    text-align: center;
}

.chatbot-fallback p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #1976d2;
}

.chatbot-fallback-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.chatbot-fallback-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.chatbot-fallback-btn:hover {
    transform: scale(1.05);
}

.chatbot-fallback-btn.line {
    background: #00b900;
}

.chatbot-fallback-btn.messenger {
    background: #0084ff;
}

.chatbot-fallback-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Input Area */
.chatbot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: var(--primary-color, #A693AC);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #A693AC);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-send:hover {
    background: var(--secondary-color, #C8E4CA);
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Typing Indicator */
.chatbot-typing {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: fit-content;
}

.chatbot-typing.active {
    display: flex;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: var(--primary-color, #A693AC);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: -10px;
    }
}
