/* 
 * Ethernal Radio - Chat UI Styles (RaveGlass Core)
 * v1.9.1 - Optimized Mobile Layers
 */

#ethernal-chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    height: 450px;
    z-index: 1060;
    display: none; /* Se activa vía JS */
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--rr-glass-border);
    background: rgba(13, 10, 18, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

#ethernal-chat.is-active {
    display: flex;
}

#ethernal-chat.chat-collapsed {
    height: 54px;
}

/* Chat Header - Capa Maestra Clickable */
.chat-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 1);
    border-bottom: 1px solid var(--rr-glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 100; /* Asegura que esté sobre el overlay */
}

.chat-header h6 {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--rr-player-accent2);
    font-weight: 700;
}

.chat-arrow {
    font-size: 0.8rem;
    color: var(--rr-player-muted2);
    transition: transform 0.4s;
}

#ethernal-chat.chat-collapsed .chat-arrow {
    transform: rotate(180deg);
}

/* Messages Area */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Input Area */
.chat-footer {
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--rr-glass-border);
}

#chat-input {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px;
    color: #fff !important;
    padding: 10px 15px;
}

.btn-chat-action {
    background: none;
    border: none;
    color: var(--rr-player-muted2);
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-chat-action:hover { color: #ff4b2b; transform: scale(1.1); }

/* Auth Overlay - Ajuste de visibilidad */
#chat-overlay {
    position: absolute;
    top: 54px; /* Empieza después del header */
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 10, 18, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    z-index: 50;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4b2b;
    box-shadow: 0 0 8px rgba(255, 75, 43, 0.4);
}

.chat-msg { animation: fadeInUp 0.3s ease; }

.badge-admin {
    background: #f97316;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
}

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

@media (max-width: 560px) {
    #ethernal-chat {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}
