/* Lake-Hosting Custom Live Chat System Styles */

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

.chat-toggle:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 30px rgba(255, 26, 45, 0.7);
    transform: scale(1.1);
}

/* Chat container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
}

.chat-container.minimized {
    height: 60px;
}

.chat-container.minimized .chat-messages,
.chat-container.minimized .typing-indicator,
.chat-container.minimized .chat-input-area {
    display: none;
}

.chat-container.minimized .chat-header {
    cursor: pointer;
}

/* Chat header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(11, 11, 15, 0.9);
    border-radius: 16px 16px 0 0;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-title {
    font-weight: 600;
    font-size: 18px;
}

.chat-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.chat-controls {
    display: flex;
    gap: 10px;
}

.chat-minimize,
.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.chat-minimize:hover,
.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Chat messages area */
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 350px;
}

/* Individual messages */
.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.user-message {
    align-self: flex-end;
}

.agent-message {
    align-self: flex-start;
}

.message-content {
    padding: 12px 15px;
    border-radius: 18px;
    line-height: 1.4;
}

.user-message .message-content {
    background: var(--primary-red);
    color: white;
    border-bottom-right-radius: 4px;
}

.agent-message .message-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    border-bottom-left-radius: 4px;
}

.message-text {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.message-time {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
}

/* Typing indicator */
.typing-indicator {
    padding: 10px 20px;
    border-top: 1px solid var(--glass-border);
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out;
}

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

.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);
    }
    30% {
        transform: translateY(-5px);
    }
}

.typing-user {
    font-size: 14px;
    color: var(--text-muted);
}

/* Chat input area */
.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    background: rgba(11, 11, 15, 0.9);
    border-radius: 0 0 16px 16px;
}

.chat-input-container {
    display: flex;
    flex-grow: 1;
    gap: 10px;
}

.chat-input {
    flex-grow: 1;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

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

.chat-send-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background: var(--accent-glow);
}

/* File upload */
.chat-file-upload {
    position: relative;
    margin-left: 10px;
}

.chat-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.chat-file-label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.chat-file-label:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Chat notification */
.chat-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 300px;
    padding: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

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

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 20px;
}

.notification-text {
    font-size: 14px;
}

/* Agent dashboard styles */
.agent-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.4);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(11, 11, 15, 0.9);
}

.agent-status {
    padding: 5px 15px;
    border-radius: 20px;
    background: #27c93f;
    color: white;
    font-size: 14px;
}

.agent-content {
    display: flex;
    flex-grow: 1;
    height: calc(100% - 60px);
}

.conversations-list {
    width: 300px;
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    overflow-y: auto;
    background: rgba(11, 11, 15, 0.5);
}

.conversations-list h3 {
    margin-bottom: 20px;
}

.chat-view {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#agent-chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#agent-chat-input {
    flex-grow: 1;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        width: calc(100% - 40px);
        height: calc(100% - 100px);
        bottom: 30px;
        right: 20px;
    }
    
    .chat-container.minimized {
        height: 60px;
    }
    
    .chat-notification {
        width: calc(100% - 80px);
        right: 20px;
    }
}