/* Modern Chatbot Styles - Blue Theme */

/* Main Container */
.wp-gemini-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px !important;
    left: auto !important;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Modern Chat Toggle Button */
.chatbot-toggle {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3) !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    position: relative !important;
    z-index: 10000 !important;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4) !important;
    background: linear-gradient(135deg, #7C3AED, #4F46E5) !important;
}

.chatbot-icon {
    font-size: 18px;
}

.chatbot-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Modern Chat Widget */
.chatbot-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

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

/* Modern Header */
.chatbot-header {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.chatbot-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.chatbot-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.chatbot-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modern Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #FAFAFA;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-message {
    display: flex;
    margin-bottom: 8px;
}

.chatbot-message-bot {
    justify-content: flex-start;
}

.chatbot-message-user {
    justify-content: flex-end;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.chatbot-message-bot .chatbot-message-content {
    background: white;
    color: #374151;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chatbot-message-user .chatbot-message-content {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.chatbot-message-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 4px;
    padding: 0 4px;
}

/* Welcome Suggestions */
.welcome-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F9FAFB;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    border-color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.suggestion-emoji {
    font-size: 16px;
    min-width: 16px;
    text-align: center;
}

.suggestion-text {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.welcome-message-text {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

/* Modern Input Area */
.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    background: #F9FAFB;
    color: #374151;
    transition: all 0.2s;
    line-height: 1.4;
    resize: none;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: #4F46E5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chatbot-input::placeholder {
    color: #9CA3AF;
}

.chatbot-send-btn {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
}

.chatbot-send-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modern Footer */
.chatbot-footer {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #E5E7EB;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #F3F4F6;
    border-radius: 16px;
    font-size: 12px;
    color: #6B7280;
    text-decoration: none;
    border: 1px solid #D1D5DB;
    transition: all 0.2s;
    font-weight: 500;
}

.footer-link:hover {
    background: #4F46E5;
    color: white;
    border-color: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.footer-credit {
    font-size: 10px;
    color: #9CA3AF;
    text-align: center;
}

.footer-credit a {
    color: #4F46E5;
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Modern Welcome Bubble */
.chatbot-welcome-bubble {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    font-size: 13px;
    line-height: 1.4;
    max-width: 250px;
    z-index: 9998;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-welcome-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

.welcome-content strong {
    display: block;
    margin-bottom: 4px;
}

.welcome-arrow {
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #4F46E5;
}

/* Responsive Design */
@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        position: fixed;
        top: 20px;
        left: 10px;
        bottom: 20px;
        right: 10px;
        border-radius: 20px;
        max-width: none;
    }

    .wp-gemini-chatbot-container {
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        transform: none !important;
    }

    .chatbot-toggle {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .chatbot-toggle .chatbot-text {
        display: none;
    }

    .chatbot-icon {
        font-size: 16px;
    }

    .chatbot-header {
        padding: 16px;
    }

    .chatbot-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .chatbot-header-text h4 {
        font-size: 14px;
    }

    .chatbot-status {
        font-size: 11px;
    }

    .chatbot-messages {
        padding: 16px;
        gap: 12px;
    }

    .chatbot-message-content {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .suggestion-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    .welcome-suggestions {
        gap: 6px;
    }



    .chat-input-area {
        padding: 16px;
        gap: 8px;
    }

    .chatbot-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .chatbot-send-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .chatbot-footer {
        padding: 12px 16px;
    }

    .contact-actions {
        flex-direction: column;
        gap: 6px;
    }

    .footer-link {
        padding: 6px 10px;
        font-size: 11px;
    }

    .footer-credit {
        font-size: 9px;
    }
}



/* Additional Modern Styles */

/* Typing Indicator */
.chatbot-typing {
    padding: 16px 20px;
    background: #FAFAFA;
}

.chatbot-typing-indicator {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
}

.chatbot-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.chatbot-typing-indicator span:nth-child(3) { animation-delay: 0s; }

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

/* Welcome Message Styles */
.welcome-message {
    background: white;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-header {
    margin-bottom: 16px;
}

.welcome-header strong {
    color: #4F46E5;
    font-size: 18px;
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.welcome-subtitle {
    color: #6B7280;
    font-size: 14px;
    display: block;
    font-weight: 500;
}

.welcome-footer {
    margin-top: 16px !important;
    font-size: 14px;
    color: #4F46E5 !important;
    font-weight: 600 !important;
    font-style: normal;
    text-align: center;
}

/* Accessibility */
.chatbot-toggle:focus,
.chatbot-close-btn:focus,
.chatbot-input:focus,
.chatbot-send-btn:focus,
.suggestion-item:focus {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

/* Animation for new messages */
.chatbot-message {
    animation: slideIn 0.3s ease-out;
}

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

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Print styles */
@media print {
    .wp-gemini-chatbot-container {
        display: none !important;
    }
}
