/* Chat Widget Styles */

/* Chat Toggle Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00B4D8, #5ba3b8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.5);
}

.chat-toggle-btn:active {
    transform: scale(0.95);
}

/* Chat Badge */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
}

/* Chat Widget Container */
.chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-widget-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chat Header */
.chat-widget-header {
    background: linear-gradient(135deg, #00B4D8, #5ba3b8);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-content {
    flex: 1;
}

.chat-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.chat-status {
    margin: 5px 0 0 0;
    font-size: 0.85em;
    opacity: 0.9;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close-btn:hover {
    transform: rotate(90deg);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot-message {
    justify-content: flex-start;
}

.chat-message.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #00B4D8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 1.1em;
}

.user-message .message-avatar {
    background: #76cfe6;
    margin-right: 0;
    margin-left: 10px;
    order: 2;
}

.message-content {
    max-width: 70%;
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: #00B4D8;
    color: white;
}

.message-content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.quick-options {
    margin: 10px 0 0 0;
    padding: 10px;
    list-style: none;
    background: #f0f0f0;
    border-radius: 5px;
}

.quick-options li {
    padding: 5px 0;
    font-size: 0.9em;
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.95em;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #00B4D8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00B4D8, #5ba3b8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 180, 216, 0.3);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Loading Indicator */
.chat-loading {
    text-align: center;
    padding: 10px;
}

.loader {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00B4D8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-widget-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-toggle-btn {
        bottom: 20px;
        right: 20px;
    }

    .message-content {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chat-widget-container {
        width: 100%;
        height: 100%;
    }

    .message-content {
        max-width: 90%;
    }

    .chat-messages {
        padding: 15px;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00B4D8;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #0095b8;
}
