/* Website Content Styles */
.website-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.website-content h1 {
    color: #333;
    margin-bottom: 20px;
}

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

/* Chat Toggle Button */
#chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

#chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Chat Window */
#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: slideIn 0.3s ease-out;
}

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

/* Chat Header */
#chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Email Form */
.email-form {
    padding: 30px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.email-form-content {
    max-width: 300px;
    text-align: center;
}

.email-form-content h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 20px;
}

.email-form-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

#user-email {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

#user-email:focus {
    border-color: #667eea;
}

.email-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.email-submit-btn:hover {
    transform: translateY(-2px);
}

.email-submit-btn:active {
    transform: translateY(0);
}

.privacy-note {
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Chat Header */
#chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#agent-status {
    font-size: 12px;
    opacity: 0.9;
    display: inline-block;
    margin-top: 4px;
}

.status-auto::before {
    content: "🤖 ";
}

.status-live::before {
    content: "👤 ";
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

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

.message {
    margin-bottom: 16px;
    animation: messageSlide 0.3s ease-out;
}

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

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

.user-message {
    text-align: right;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

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

.agent-message .message-content {
    background: #e3f2fd;
    color: #1565c0;
    border-bottom-left-radius: 4px;
    border-left: 3px solid #1565c0;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.user-message .message-time {
    text-align: right;
}

/* Typing Indicator */
#typing-indicator {
    padding: 0 20px 10px;
    background: #f8f9fa;
}

.typing-dots {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dots span {
    height: 8px;
    width: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

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

/* Input Area */
#chat-input-area {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #667eea;
}

#send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#send-btn:hover {
    transform: scale(1.05);
}

#send-btn:active {
    transform: scale(0.95);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scrollbar Styles */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        max-height: 600px;
    }
}

/* Waiting for Agent */
.waiting-for-agent {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    margin: 8px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
    font-size: 13px;
    color: #666;
    animation: fadeInUp 0.3s ease-out;
}

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

.waiting-dot {
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
    margin-right: 4px;
    animation: waitingPulse 1.4s infinite ease-in-out;
}

.waiting-dot:nth-child(1) {
    animation-delay: 0s;
}

.waiting-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.waiting-dot:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 8px;
}

@keyframes waitingPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
