/* ===== WEBSITE CHAT WIDGET ===== */

#we-chat-widget {
    position: fixed;
    bottom: 0;
    right: 7px;
    left: calc(50vw + 513px + 4px);
    min-width: 160px;
    z-index: 9999;
    font-family: 'Times New Roman', Times, serif;
    font-size: 18px;
    color: #ffffff;
    border: 1px solid rgba(255, 60, 60, 0.85);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 10px rgba(255, 40, 40, 0.5), inset 0 0 6px rgba(120, 0, 0, 0.15);
}

#we-chat-header {
    background: rgba(40, 10, 40, 0.95);
    border: 1px solid rgba(180, 120, 180, 0.35);
    border-bottom: 1px solid rgba(255, 60, 60, 0.85);
    padding: 14px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    user-select: none;
}

#we-chat-title {
    color: #ffc144;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 60, 60, 0.8), 0 0 20px rgba(255, 0, 0, 0.4);
    background: linear-gradient(to bottom, rgba(120,0,0,0.3), rgba(60,0,0,0.5));
    border: 1px solid rgba(255, 60, 60, 0.4);
    border-radius: 4px;
    padding: 4px 14px;
    animation: register-pulse 2.5s ease-in-out infinite;
}

#we-chat-arrow {
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
}

#we-chat-body {
    background: rgba(28, 4, 28, 0.95);
    border: 1px solid rgba(180, 120, 180, 0.35);
    border-top: none;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 4px 4px;
    height: 555px;
    overflow: hidden;
}

#we-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(180,120,180,0.4) transparent;
    min-height: 0;
}

#we-chat-messages::-webkit-scrollbar { width: 4px; }
#we-chat-messages::-webkit-scrollbar-track { background: transparent; }
#we-chat-messages::-webkit-scrollbar-thumb { background: rgba(180,120,180,0.4); border-radius: 2px; }

.we-chat-line {
    line-height: 1.6;
    word-break: break-word;
    flex-shrink: 0;
    font-size: 16px;
}

.we-chat-time {
    color: rgba(255,255,255,0.38);
    font-size: 16px;
}

.we-chat-user {
    color: #d4a843;
    font-weight: bold;
    font-size: 18px;
}

.we-chat-vip {
    color: #FFD700 !important;
}

.we-chat-user:not(.we-chat-vip) {
    color: #c47f2a !important;
}

.we-chat-text {
    color: #ffffff;
    font-size: 18px;
}

#we-chat-input-area {
    border-top: 1px solid rgba(255, 60, 60, 0.85);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

#we-chat-emoji-picker {
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    background: rgba(18, 3, 18, 0.98);
    border: 1px solid rgba(180,120,180,0.25);
    border-radius: 3px;
    display: none;
}

.we-chat-emoji {
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
    padding: 2px;
    transition: transform 0.1s;
    flex-shrink: 0;
}
.we-chat-emoji:hover { transform: scale(1.3); }

#we-chat-input-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

#we-chat-emoji-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 23px;
    padding: 0;
    line-height: 1;
    color: #ffffff;
    flex-shrink: 0;
}

#we-chat-input {
    flex: 1;
    background: #160318 !important;
    border: 1px solid rgba(180,120,180,0.35) !important;
    color: #ffffff !important;
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 18px !important;
    padding: 5px 8px !important;
    border-radius: 3px;
    outline: none;
    min-width: 0;
    height: 32px;
    box-sizing: border-box;
}

#we-chat-input:focus { border-color: rgba(180,120,180,0.75) !important; }
#we-chat-input::placeholder { color: rgba(255,255,255,0.28); font-size: 14px; }

#we-chat-send {
    background: rgba(90, 20, 90, 0.75);
    border: 1px solid rgba(180,120,180,0.4);
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    padding: 0 10px;
    border-radius: 3px;
    flex-shrink: 0;
    height: 32px;
    transition: background 0.2s;
}
#we-chat-send:hover { background: rgba(130, 45, 130, 0.85); }

#we-chat-login-notice {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(180,120,180,0.2);
}

#we-chat-login-notice a {
    color: #d4a843 !important;
    font-family: 'Times New Roman', Times, serif;
    font-size: 18px;
    text-decoration: none;
}
#we-chat-login-notice a:hover { color: #ffffff !important; }

#we-chat-icon {
    color: #ffffff;
    font-size: 27px;
    line-height: 1;
}

#we-chat-online {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-family: 'Cinzel', serif;
    font-size: 23px;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 23px;
    margin-right: auto;
}

#we-chat-online-count {
    font-family: 'Cinzel', serif !important;
    font-size: 22px;
    font-weight: bold;
    color: #ffc144;
}

#we-chat-icon.has-unread {
    animation: unread-pulse 3s ease-in-out infinite;
}

@keyframes unread-pulse {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.4)); }
    50%       { filter: drop-shadow(0 0 5px rgba(255,255,255,0.9)); }
}