/* Chat Widget Styles - Adapted to Theme Variables */
#chat-widget-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 10000;
    font-family: 'Outfit', sans-serif;
}

#chat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-icon:hover {
    transform: scale(1.1);
}

#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-card, #1a1f2b);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

#chat-header {
    background: var(--primary);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.admin {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.system {
    align-self: center;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 12px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
    padding: 8px 15px;
    margin: 10px 0;
}

#chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: var(--bg-card);
}

#chat-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 15px;
    border-radius: 20px;
    outline: none;
}

#chat-actions {
    padding: 5px 15px 10px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    background: var(--bg-card);
}

#chat-actions span {
    cursor: pointer;
    color: var(--text-muted);
    text-decoration: underline;
}

#chat-actions span:hover {
    color: var(--primary);
}

/* Modal Styling */
#chat-email-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

#chat-email-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 25px;
    border-radius: 12px;
    width: 320px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
#chat-email-content h4 { margin-top: 0; color: var(--primary); }
#chat-email-content input {
    width: 100%; margin-bottom: 15px; padding: 10px; 
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); 
    border-radius: 6px; color: var(--text-main);
}
