/* ===================================
   TABBAR - NAVEGAÇÃO INFERIOR LUXO
   Fundo Preto | Ícones Prata | Ativo: Prata Brilhante
   =================================== */

.tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #000000 !important;
    border-top: 1px solid rgba(192,192,192,.28) !important;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 24px rgba(0,0,0,.8) !important;
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: rgba(192,192,192,.5);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    min-width: 60px;
}

.tabbar-item i { font-size: 20px; transition: all 0.2s; }
.tabbar-item svg { transition: all 0.2s; }
.tabbar-item span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Hover */
.tabbar-item:hover {
    color: #C0C0C0;
}
.tabbar-item:hover i, .tabbar-item:hover svg {
    transform: scale(1.1);
}

/* ATIVO — Prata Polida com brilho intenso */
.tabbar-item.active {
    color: #C0C0C0;
    filter: drop-shadow(0 0 6px rgba(192,192,192,.55));
}
.tabbar-item.active i {
    color: #d8d8d8;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255,255,255,.5));
}
.tabbar-item.active svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255,255,255,.4));
    fill: #d8d8d8;
}
.tabbar-item.active span {
    color: #C0C0C0;
    text-shadow: 0 0 8px rgba(192,192,192,.5);
}
.tabbar-item.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 2px;
    background: linear-gradient(90deg, transparent, #C0C0C0, transparent);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 8px rgba(192,192,192,.6);
}

/* Badge */
.chat-badge {
    position: absolute; top: 4px; right: 8px;
    background: #ff4454; color: #fff;
    font-size: 9px; font-weight: 700;
    padding: 2px 5px; border-radius: 10px;
    min-width: 16px; text-align: center;
}

/* ===================================
   MODAL CHAT
   =================================== */
.chat-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,0,0,.96);
    backdrop-filter: blur(4px);
    z-index: 9999; display: none;
    justify-content: center; align-items: center; padding: 20px;
}
.chat-modal.active { display: flex; }

.chat-container {
    width: 100%; max-width: 500px;
    height: 70vh; max-height: 600px;
    background: #1a0000;
    border-radius: 12px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 0 1px rgba(192,192,192,.18);
}
@media (max-width: 768px) {
    .chat-container {
        max-width: 100%;
        height: calc(100vh - 140px);
        max-height: calc(100vh - 140px);
        border-radius: 12px;
        margin-bottom: 80px;
    }
}

.chat-header {
    background: #2a0000;
    padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(192,192,192,.18);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-info i { font-size: 24px; color: #C0C0C0; }
.chat-header-info h3 { margin: 0; font-size: 16px; font-weight: 700; color: #FDFDFD; }
.chat-users-count { font-size: 12px; color: rgba(192,192,192,.6); }
.chat-close-btn {
    background: transparent; border: none;
    color: rgba(192,192,192,.6); font-size: 20px;
    cursor: pointer; padding: 8px; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
}
.chat-close-btn:hover { background: rgba(192,192,192,.12); color: #FDFDFD; }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px;
    background: #0a0000;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: #1a0000; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(192,192,192,.2); border-radius: 3px; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(192,192,192,.4); }

.chat-system-message {
    background: rgba(192,192,192,.08);
    border: 1px solid rgba(192,192,192,.2);
    color: #C0C0C0; padding: 12px 16px;
    border-radius: 8px; font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}

.chat-message {
    background: #1a0000; padding: 12px 16px;
    border-radius: 8px; border-left: 3px solid #C0C0C0;
}
.chat-message-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.chat-username { font-size: 13px; font-weight: 700; color: #C0C0C0; }
.chat-time { font-size: 11px; color: rgba(192,192,192,.5); }
.chat-message-text { font-size: 14px; color: #FDFDFD; line-height: 1.5; word-wrap: break-word; }

.chat-input-container {
    background: #2a0000; padding: 16px 20px;
    display: flex; gap: 12px;
    border-top: 1px solid rgba(192,192,192,.18);
}
.chat-input {
    flex: 1; background: #0a0000;
    border: 1px solid rgba(192,192,192,.22);
    border-radius: 8px; padding: 12px 16px;
    color: #FDFDFD; font-size: 14px; transition: all 0.2s;
}
.chat-input:focus { outline: none; border-color: #C0C0C0; }
.chat-input::placeholder { color: rgba(192,192,192,.4); }

.chat-send-btn {
    background: linear-gradient(135deg, #C0C0C0 0%, #a0a0a0 100%);
    color: #0a0000; border: none; border-radius: 8px;
    padding: 12px 20px; cursor: pointer; font-size: 16px;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover {
    background: linear-gradient(135deg, #d8d8d8 0%, #b8b8b8 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(192,192,192,.3);
}
.chat-send-btn:active { transform: scale(0.95); }

/* ===================================
   RESPONSIVO
   =================================== */
@media (max-width: 768px) {
    .chat-modal { padding: 20px; align-items: flex-start; padding-top: 60px; }
    .tabbar-item span { font-size: 9px; }
    .tabbar-item i { font-size: 18px; }
}
@media (min-width: 769px) {
    .tabbar { display: none !important; }
}
@media (max-width: 768px) {
    body { padding-bottom: 70px; }
}
