#chat-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 320px;
    height: 480px;
    background: var(--panel-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    color: var(--text-primary);
}

#chat-panel.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 16px;
    margin: 4px 0;
    position: relative;
}

.message-content {
    display: flex;
    flex-direction: column;
}

.message-text {
    margin-bottom: 4px;
}

.message-info {
    font-size: 12px;
    opacity: 0.7;
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 2px;
}

.message.sent {
    background: var(--gradient-primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.received {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message.sent .message-info,
.message.sent .message-time {
    color: rgba(255, 255, 255, 0.906);
    text-align: right;
}

.message.received .message-info,
.message.received .message-time {
    color: var(--text-secondary);
}

.chat-input {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: center;
}

#message-input {
    flex-grow: 1;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 24px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

#message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#send-message {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

#chat-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}