/* ========================================== */
/* MUNDO DE ELDORA - SISTEMA SOCIAL (social.css) */
/* ========================================== */

/* 💬 BOTÃO DO CHAT NO MAPA */
.btn-social-mapa {
    position: fixed; 
    top: 125px; /* Fica logo abaixo do Passe de Batalha (que está no 80px) */
    right: 8px; 
    width: 45px; /* Um pouco maior para a imagem ficar nítida */
    height: 45px;
    background: rgba(15, 23, 42, 0); 
    border: 2px solid #3498db00; 
    border-radius: 50%;
    cursor: pointer; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    box-shadow: 0 0 6px rgba(252, 39, 99, 0); 
    z-index: 1000; 
    transition: transform 0.2s, background 0.2s;
    padding: 6px; /* Espaço para a imagem não tocar nas bordas */
}

.btn-social-mapa img {
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

.btn-social-mapa:hover { 
    transform: scale(1.10); 
    background: rgba(1, 10, 15, 0); 
}

/* ==========================================
   🛡️ TEMA: TAVERNA RPG MODERNA 
   ========================================== */

/* 1. O Fundo Escuro do Modal (Substituindo a social-container antiga) */
#hub-social {
    position: fixed !important; /* 👈 A MÁGICA: Obriga o Z-Index a funcionar! */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important; /* 👈 Agora sim ele vai esmagar o z-index 10 do Passe */
    background: rgba(0, 0, 0, 0.85) !important; 
    backdrop-filter: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. O Quadro Principal da Taverna */
#hub-social > div, .social-container {
    position: relative !important; /* 👈 Mantém o quadro na camada certa */
    z-index: 100000 !important; 
    background: #121214 !important; /* Zinco escuro */
    border: 1px solid #27272a !important;
    border-top: 3px solid #ca8a04 !important; /* Borda dourada */
    border-radius: 6px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.95) !important;
    
    width: 95% !important;
    max-width: 360px !important; 
    height: 80vh !important;
    max-height: 550px !important;
    
    padding: 0 !important; 
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* 3. O Cabeçalho (Título e fechar) */
#hub-social > div > div:first-child, .social-header {
    background: #18181b !important;
    padding: 15px !important;
    border-bottom: 1px solid #27272a !important;
    margin-bottom: 0 !important;
    display: flex; justify-content: space-between; align-items: center;
}

.btn-fechar-social { 
    background: transparent; border: none; color: #ef4444; 
    font-weight: bold; cursor: pointer; font-size: 1.2em; 
}

/* 4. Abas Superiores Minimalistas */
.social-abas { display: flex; background: #18181b !important; }
.aba-soc { 
    flex: 1; padding: 12px 5px !important; background: transparent; border: none !important; 
    color: #71717a !important; font-family: 'Cinzel', serif; cursor: pointer; 
    border-bottom: 2px solid transparent !important; transition: 0.2s;
    font-weight: bold !important; font-size: 0.8em !important; 
    letter-spacing: 1px !important; text-transform: uppercase !important;
}
.aba-soc.active { 
    color: #facc15 !important; 
    border-bottom: 2px solid #facc15 !important; 
    background: #27272a !important; 
}

/* 5. O Fundo do Chat */
#chat-box, .social-content, .chat-historico {
    background: #09090b !important; /* Breu total para destacar os Cards */
    padding: 15px 12px !important;
    height: 100% !important;
    flex: 1; overflow-y: auto;
}

/* Estilizando a barra de rolagem do chat */
#chat-box::-webkit-scrollbar, .chat-historico::-webkit-scrollbar { width: 6px; }
#chat-box::-webkit-scrollbar-track, .chat-historico::-webkit-scrollbar-track { background: #09090b; }
#chat-box::-webkit-scrollbar-thumb, .chat-historico::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }

/* 6. A Barra de Digitação (Rodapé) */
.chat-input-area {
    background: #18181b !important;
    padding: 12px !important;
    border-top: 1px solid #27272a !important;
    margin: 0 !important;
    display: flex; gap: 5px;
}

/* 7. O Campo de Texto */
#input-chat {
    flex: 1;
    background: #000 !important;
    border: 1px solid #3f3f46 !important;
    color: #e4e4e7 !important;
    border-radius: 4px !important;
    padding: 10px !important;
}

/* 8. O Botão de Enviar Dourado */
.chat-input-area button {
    background: linear-gradient(180deg, #ca8a04, #854d0e) !important;
    border: 1px solid #713f12 !important;
    color: white !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 0.8em !important;
    border-radius: 4px !important;
    padding: 0 15px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8) !important;
    cursor: pointer !important;
}


/* ========================================== */
/* 🔍 MINI-MENU FLUTUANTE (Inspeção) */
/* ========================================== */
.menu-flutuante {
    position: fixed !important; /* Fixo na tela, ignora o scroll do mapa */
    top: 50% !important;        /* Empurra 50% pro meio verticalmente */
    left: 50% !important;       /* Empurra 50% pro meio horizontalmente */
    transform: translate(-50%, -50%) !important; /* Centraliza perfeitamente no próprio eixo */
    
    background: rgba(15, 23, 42, 0.95); 
    border: 1px solid #ca8a04; /* Bordinha dourada para combinar com a nova Taverna */
    border-radius: 8px; 
    padding: 10px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.9); /* Sombra mais forte para destacar no meio */
    z-index: 2000;
    display: flex; flex-direction: column; gap: 5px; min-width: 150px;
}

.menu-flutuante button {
    background: transparent; border: none; color: white; text-align: left; 
    padding: 8px; cursor: pointer; border-radius: 4px; transition: 0.2s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
}

.menu-flutuante button:hover { background: rgba(202, 138, 4, 0.3); } /* Hover douradinho */

/* ========================================== */
/* 🌟 NOTIFICAÇÕES ANIMADAS DE CHAT */
/* ========================================== */
.chat-msg-grupo {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), transparent);
    border-left: 3px solid #10b981; padding: 6px 10px; margin-bottom: 6px;
    border-radius: 0 6px 6px 0; font-size: 0.85em; color: #d1fae5;
    animation: slideInChat 0.3s ease-out;
}
.chat-msg-grupo strong { color: #34d399; }

.chat-msg-loot {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), transparent);
    border-left: 3px solid #f59e0b; padding: 6px 10px; margin-bottom: 6px;
    border-radius: 0 6px 6px 0; font-size: 0.85em; color: #fef3c7;
    animation: slideInChat 0.3s ease-out;
}
.chat-msg-loot strong { color: #fbbf24; text-shadow: 0 1px 2px #000; }

@keyframes slideInChat {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================
   🎭 MENU DE EXPRESSÕES NO MAPA
   ========================================== */
.grid-emojis-mapa {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.emoji-btn {
    background: #18181b !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 10px !important;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.emoji-btn.ativo:hover {
    border-color: #facc15 !important;
    background: #27272a !important;
    transform: scale(1.25);
}

.emoji-btn.bloqueado {
    background: #09090b !important;
    border-color: #1c1917 !important;
    color: #3f3f46 !important;
    font-size: 1.2em;
    cursor: not-allowed;
}

/* Garante que o botão principal pulse quando o mouse passa */
#btn-expressoes:hover {
    background: rgba(202, 139, 4, 0);
    border-color: #ca8b0400;
}

/* ==========================================
   Tamanho Customizado do Botão de Expressões
   ========================================== */
#btn-expressoes {
    width: 60px !important;  /* Aumenta o tamanho geral do botão */
    height: 60px !important; 
    padding: 2px !important; /* Remove a margem interna para a imagem ocupar todo o espaço */
}

/* Se quiser que a imagem fique levemente maior até passar da borda do botão */
#btn-expressoes img {
    transform: scale(0.9); /* Dá um zoom de 10% só na imagem */
}

/* ========================================== */
/* 🔔 NOTIFICAÇÕES TOAST (MUNDO DE ELDORA)    */
/* ========================================== */
#eldora-toast {
    position: fixed;
    top: -100px; /* Começa escondido no topo */
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999999;
    
    /* Padrão visual puxado direto do #hub-social */
    background: #121214; 
    border: 1px solid #27272a;
    border-top: 3px solid #ca8a04; 
    border-radius: 6px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9);
    
    color: #e4e4e7;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95em;
    font-weight: bold;
    padding: 12px 24px;
    
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    
    /* Animação com um "quique" suave no final */
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

#eldora-toast .toast-icon {
    font-size: 1.4em;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8));
}

/* Quando o JS adiciona esta classe, a notificação desce! */
#eldora-toast.mostrar {
    top: 25px; 
}