/* Chatbot Styles - Self-contained to avoid conflicts */
.hypno-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Button */
.hypno-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hypno-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.hypno-chat-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.hypno-chat-button:active::before {
    transform: scale(1);
}

.hypno-chat-icon {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
}

.hypno-chat-button.open .hypno-chat-icon {
    transform: rotate(180deg);
}

/* Chat Popup */
.hypno-chat-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    height: 60vh;
    max-height: 600px;
    min-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.hypno-chat-popup.show {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

/* Chat Header */
.hypno-chat-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.hypno-chat-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.hypno-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.hypno-chat-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.hypno-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.hypno-chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.hypno-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hypno-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Message Bubbles */
.hypno-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.hypno-message.bot {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hypno-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.hypno-message.typing {
    align-self: flex-start;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px;
}

.hypno-typing-dots {
    display: flex;
    gap: 4px;
}

.hypno-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: typingDot 1.4s infinite ease-in-out;
}

.hypno-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.hypno-typing-dot:nth-child(2) { animation-delay: -0.16s; }

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

/* Input Area */
.hypno-chat-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.hypno-chat-input-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.hypno-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.hypno-chat-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.hypno-chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.hypno-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hypno-send-icon {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hypno-chatbot-container {
        bottom: 15px;
        right: 15px;
    }
    
    .hypno-chat-popup {
        width: calc(100vw - 30px);
        height: 60vh;
        right: -15px;
        bottom: 70px;
    }
    
    .hypno-chat-button {
        width: 56px;
        height: 56px;
    }
    
    .hypno-chat-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .hypno-chat-popup {
        width: calc(100vw - 20px);
        right: -10px;
        height: 50vh;
        min-height: 350px;
    }
    
    .hypno-chat-messages {
        padding: 16px;
        gap: 12px;
    }
    
    .hypno-message {
        font-size: 13px;
        padding: 10px 14px;
    }
}

