/* Chat Module Styles */

/* Chat Bubble - Floating Button */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse-bubble 2s infinite;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 140, 0, 0.7);
}

.chat-bubble i {
    font-size: 26px;
    color: var(--black);
}

@keyframes pulse-bubble {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 140, 0, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 140, 0, 0.8);
    }
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 100px);
    background: var(--dark-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background: var(--gradient-gold);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-content i {
    font-size: 28px;
    color: var(--black);
}

.chat-header-content h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    margin: 0;
}

.chat-status {
    font-size: 12px;
    color: rgba(10, 10, 10, 0.7);
    font-weight: 600;
}

.chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(10, 10, 10, 0.2);
    color: var(--black);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(10, 10, 10, 0.3);
    transform: scale(1.1);
}

.chat-close-btn i {
    font-size: 16px;
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--dark-bg);
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar i {
    font-size: 20px;
    color: var(--black);
}

.message-content {
    flex: 1;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
}

.message-content p {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.message-content p + p {
    margin-top: 8px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: rgba(255, 140, 0, 0.2);
    border-color: rgba(255, 140, 0, 0.3);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #FF8C00 0%, #FF4500 100%);
}

/* Success Message */
.success-message .message-content {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.success-message .message-content p {
    color: #00ff00;
}

/* Chat Footer */
.chat-footer {
    padding: 20px;
    background: var(--dark-card);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 0 0 20px 20px;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.chat-submit-btn {
    width: 45px;
    height: 45px;
    background: var(--gradient-gold);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.5);
}

.chat-submit-btn:active {
    transform: translateY(0);
}

.chat-submit-btn i {
    font-size: 18px;
    color: var(--black);
}

.chat-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-submit-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Loading Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-bubble {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .chat-bubble i {
        font-size: 24px;
    }

    .chat-widget {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }

    .chat-footer {
        border-radius: 0;
    }
}
