/* Modern ChatGPT-like Design with #15499F, #F68826, #FFFFFF Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f7f7f8;
    overflow: hidden;
}

.chatbot-main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
}

/* Header Styles */
.chat-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-container {
    position: relative;
    margin-right: 12px;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #15499F;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
}

.header-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.status-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #15499F;
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f7f7f8;
}

.chat-messages {
    max-width: 800px;
    margin: 0 auto;
}

/* Message Styles */
.message {
    display: flex;
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease-out;
}

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

.message.user-message .message-content {
    background: #15499F;
    color: white;
    margin-left: 60px;
    margin-right: 0;
}

.message.user-message .message-content .message-body {
    color: white;
}

.message.user-message .message-content .sender-name {
    color: rgba(255, 255, 255, 0.9);
}

.message.user-message .message-content .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message.user-message .message-avatar {
    order: 2;
    margin-left: 12px;
    margin-right: 0;
}

.message.user-message .avatar-img {
    background: linear-gradient(135deg, #15499F 0%, #3A73D5 100%);
    border: 2px solid #15499F;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    position: relative;
}

.message.user-message .avatar-img img {
    display: none;
}

.message.user-message .avatar-img::before {
    content: '👤';
    font-size: 20px;
}

.message-avatar {
    flex-shrink: 0;
    margin-right: 12px;
}

.message-content {
    background: white;
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 70%;
    position: relative;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sender-name {
    font-weight: 600;
    color: #15499F;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #9ca3af;
}

.message-body {
    line-height: 1.6;
    color: #374151;
}

.message-body p {
    margin: 0;
}

.message-body strong {
    color: #15499F;
    font-weight: 600;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #15499F;
}

/* Input Container */
.chat-input-container {
    background: white;
    border-top: 1px solid #e5e5e5;
    padding: 16px 24px;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    padding: 8px;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    border-color: #15499F;
    box-shadow: 0 0 0 3px rgba(21, 73, 159, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
    resize: none;
}

.chat-input::placeholder {
    color: #9ca3af;
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #15499F;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

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

.send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    text-align: center;
    margin-top: 8px;
}

.input-footer small {
    color: #9ca3af;
    font-size: 12px;
}

/* Floating Stop Button */
.floating-stop-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    font-weight: 500;
}

.floating-stop-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.floating-stop-btn i {
    font-size: 18px;
}

/* Typing Animation */
.typing-dots {
    display: inline-block;
}

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

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

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

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #15499F;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #15499F;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        padding: 16px;
    }

    .chat-input-container {
        padding: 12px 16px;
    }

    .message-content {
        max-width: 85%;
    }

    .header-content {
        padding: 0;
    }

    .quick-actions {
        left: 16px;
        right: 16px;
        max-width: none;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .floating-stop-btn {
        right: 16px;
        bottom: 80px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
    }

    .floating-stop-btn span {
        display: none;
    }

    .floating-stop-btn i {
        margin: 0;
        font-size: 20px;
    }
}

