/* Chat Widget Styles */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: var(--surface-dark, #333);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    max-height: 500px;
    border: 1px solid var(--border-color, #444);
}

#chat-widget.minimized {
    height: 60px;
    overflow: hidden;
}

#chat-widget.hidden {
    display: none !important;
}

.chat-header {
    background-color: var(--surface-dark-alt, #444);
    color: var(--text-primary, white);
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #555);
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.chat-header h3 i {
    margin-right: 8px;
}

.chat-header .controls {
    display: flex;
    gap: 10px;
}

.chat-header .control-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #ddd);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s;
}

.chat-header .control-btn:hover {
    color: var(--text-primary, white);
}

.chat-content {
    display: flex;
    height: 340px;
    border-bottom: 1px solid var(--border-color, #444);
}

.chat-sidebar {
    width: 120px;
    background-color: var(--surface-dark-alt, #2a2a2a);
    border-right: 1px solid var(--border-color, #444);
    overflow-y: auto;
    max-height: 340px;
}

.chat-sidebar .chat-nav-item {
    padding: 10px;
    color: var(--text-secondary, #ddd);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(51, 51, 51, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.chat-sidebar .chat-nav-item i {
    margin-right: 6px;
    font-size: 12px;
}

.chat-sidebar .chat-nav-item.active {
    background-color: rgba(124, 77, 255, 0.2);
    color: var(--text-primary, white);
    border-left: 3px solid var(--primary, #7c4dff);
}

.chat-sidebar .chat-nav-item:hover:not(.active) {
    background-color: rgba(51, 51, 51, 0.5);
}

.chat-sidebar .online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success, #505050);
    border-radius: 50%;
    margin-right: 5px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    max-height: 340px;
    background-color: var(--surface-dark, #222);
}

.message {
    margin-bottom: 10px;
    max-width: 80%;
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message.system {
    align-self: center;
    max-width: 100%;
}

.message-content {
    background-color: var(--surface-dark-alt, #444);
    color: var(--text-primary, white);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 14px;
    position: relative;
    word-wrap: break-word;
}

.message.sent .message-content {
    background-color: var(--primary-dark, #7c4dff);
    color: white;
}

.message.system .message-content {
    background-color: rgba(51, 51, 51, 0.5);
    color: var(--text-secondary, #aaa);
    font-style: italic;
    text-align: center;
    font-size: 12px;
    padding: 6px 10px;
}

.message-sender {
    font-size: 12px;
    color: var(--text-secondary, #ddd);
    margin-bottom: 3px;
    font-weight: 600;
}

.message.private .message-content {
    background-color: rgba(255, 64, 129, 0.2);
    border: 1px solid rgba(255, 64, 129, 0.3);
}

.message-time {
    font-size: 10px;
    color: var(--text-secondary, #ddd);
    margin-top: 3px;
    text-align: right;
}

.chat-input {
    padding: 10px;
    background-color: var(--surface-dark, #333);
    border-radius: 0 0 8px 8px;
}

.chat-input-wrapper {
    display: flex;
    background-color: var(--input-bg, #444);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color, #444);
}

.chat-input input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: var(--text-primary, white);
    font-size: 14px;
    outline: none;
}

.chat-input button {
    background-color: var(--primary, #7c4dff);
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: var(--primary-dark, #6237db);
}

.chat-input button:disabled {
    background-color: var(--surface-dark-alt, #444);
    color: var(--text-secondary, #aaa);
    cursor: not-allowed;
}

/* Updated Chat Toggle Button Styles */
#chat-toggle {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #505050 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3) !important;
    z-index: 999 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    text-decoration: none !important;
}

#chat-toggle:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4) !important;
    background-color: #707070 !important;
}

#chat-toggle:active {
    transform: scale(0.95) !important;
}

#chat-toggle.active {
    display: none !important;
}

#chat-notification {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background-color: #f44336 !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 1000 !important;
} 