/* Chat Support System Styles */
:root {
    --chat-primary: #4f6cf7;
    --chat-secondary: #3a56e8;
    --chat-bg: #1a1a24;
    --chat-header: #22222e;
    --chat-border: #32324a;
    --chat-text: #e2e2f0;
    --chat-text-secondary: #9e9eb3;
    --chat-user-bubble: #4f6cf7;
    --chat-admin-bubble: #2c2c3a;
    --chat-shadow: rgba(0, 0, 0, 0.2);
}

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--chat-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px var(--chat-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-button:hover {
    background-color: var(--chat-secondary);
    transform: scale(1.05);
}

.chat-button i {
    font-size: 24px;
}

.chat-button .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e94560;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--chat-shadow);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.chat-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Chat Header */
.chat-header {
    background-color: var(--chat-header);
    padding: 15px;
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: var(--chat-text);
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header .close-chat {
    color: var(--chat-text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s ease;
}

.chat-header .close-chat:hover {
    color: var(--chat-text);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-message.user-message {
    align-self: flex-end;
    background-color: var(--chat-user-bubble);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.admin-message {
    align-self: flex-start;
    background-color: var(--chat-admin-bubble);
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.7;
    text-align: right;
}

/* Chat Input */
.chat-input {
    padding: 15px;
    border-top: 1px solid var(--chat-border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--chat-border);
    background-color: #2c2c3a;
    color: var(--chat-text);
    outline: none;
}

.chat-input input:focus {
    border-color: var(--chat-primary);
}

.chat-input button {
    background-color: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background-color: var(--chat-secondary);
}

.chat-input button i {
    margin-right: 5px;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    color: var(--chat-text-secondary);
    margin: 20px 0;
    font-size: 14px;
    padding: 0 15px;
}

/* Loading Indicator */
.chat-loading {
    display: flex;
    justify-content: center;
    padding: 15px;
}

.chat-loading .dot {
    width: 8px;
    height: 8px;
    background-color: var(--chat-text-secondary);
    border-radius: 50%;
    margin: 0 3px;
    animation: bounce 1.5s infinite ease-in-out;
}

.chat-loading .dot:nth-child(1) { animation-delay: 0s; }
.chat-loading .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-loading .dot:nth-child(3) { animation-delay: 0.4s; }

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

/* Login Prompt */
.chat-login-prompt {
    text-align: center;
    padding: 20px;
    color: var(--chat-text);
}

.chat-login-prompt p {
    margin-bottom: 15px;
}

.chat-login-prompt a {
    display: inline-block;
    background-color: var(--chat-primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.chat-login-prompt a:hover {
    background-color: var(--chat-secondary);
}

/* Responsive Design for Mobile */
@media (max-width: 576px) {
    .chat-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-button {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .chat-header {
        padding: 12px 15px;
    }

    .chat-input {
        padding: 10px;
    }

    .chat-input input {
        padding: 8px 12px;
    }

    .chat-input button {
        padding: 8px 12px;
    }
}