/* Claude Chatbot Widget Styles - Designed for ZenReach */

.chatbot-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* Toggle Button */
.chatbot-toggle-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chatbot-toggle-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.chatbot-toggle-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.chatbot-toggle-button:hover::before {
    opacity: 1;
}

.chatbot-toggle-button svg {
    width: 30px;
    height: 30px;
    fill: white;
    transition: transform 0.3s ease;
}

.chatbot-toggle-button:hover svg {
    transform: scale(1.1);
}

/* Notification Badge */
.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ff4757;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid var(--darker);
    animation: pulseNotification 2s infinite;
}

@keyframes pulseNotification {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 95px;
    right: 20px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-window.active {
    display: flex;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.chatbot-window:hover .chatbot-header::before {
    left: 100%;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    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);
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--darker);
    position: relative;
}

/* Custom Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Messages */
.message {
    max-width: 75%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.message.bot {
    align-self: flex-start;
    background: var(--card-bg);
    color: var(--light);
    padding: 12px 18px;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 12px 18px;
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 2px;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { 
        transform: translateY(0);
        opacity: 0.7;
    }
    30% { 
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Area */
.chatbot-input-container {
    padding: 1.5rem;
    background: var(--card-bg);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 18px;
    background: var(--dark);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 25px;
    color: var(--light);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chatbot-input::placeholder {
    color: var(--text-secondary);
}

.chatbot-send {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.chatbot-send:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

.chatbot-send svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* Welcome message animation */
.welcome-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        max-height: none;
        right: 10px;
        left: 10px;
        bottom: 80px;
    }
    
    .chatbot-toggle-button {
        width: 55px;
        height: 55px;
    }
    
    .chatbot-toggle-button svg {
        width: 25px;
        height: 25px;
    }
}

/* Pulse animation for button when first loaded */
@keyframes initialPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(16, 185, 129, 0.8);
    }
}

.chatbot-toggle-button.pulse {
    animation: initialPulse 2s ease-in-out 3;
}