/* ===================================
   UAI7 — TABBAR + CHAT
   Cores atualizadas para o novo tema
   =================================== */

:root {
    --tb-bg:    #07111C;
    --tb-border:#132234;
    --tb-text:  #3D5A72;
    --tb-active:#F0B429;
    --accent-green: #F0B429;
    --accent-green-hover: #F7CC60;
}

/* ── TABBAR ── */
.tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(4,12,20,.97);
    border-top: 1px solid rgba(255,255,255,.055);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}

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

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

.tabbar-item:hover,
.tabbar-item.active { color: var(--tb-active); }

.tabbar-item:hover i,
.tabbar-item.active i { transform: scale(1.1); filter: drop-shadow(0 0 5px rgba(240,180,41,.5)); }

/* PONTO AO VIVO */
.tab-live-dot {
    position: absolute;
    top: -2px; right: -4px;
    width: 7px; height: 7px;
    background: #FF3D5A;
    border-radius: 50%;
    border: 1.5px solid rgba(4,12,20,.97);
    animation: tab-pulse 1.4s infinite;
}
@keyframes tab-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,61,90,.6); }
    50%      { box-shadow: 0 0 0 4px rgba(255,61,90,0); }
}

/* SALDO VISÍVEL NO MOBILE */
@media(max-width:740px) {
    .tb-bal { display: flex !important; }
    .tb-bal-info { display: flex !important; }
    .tb-bal-val { font-size: 13px !important; }
    .tb-bal-lbl { display: none; }
    .tb-bal { padding: 6px 10px !important; gap: 6px !important; }
    .tb-bal-ico { width: 20px !important; height: 20px !important; font-size: 9px !important; }
}

.tabbar-item.active::after {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 2px;
    background: var(--tb-active);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 8px rgba(240,180,41,.5);
}

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

/* ── CHAT MODAL ── */
.chat-modal {
    position: fixed; inset: 0;
    background: rgba(4,12,20,.9);
    backdrop-filter: blur(6px);
    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: #07111C;
    border-radius: 16px;
    display: flex; flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
}

@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: #0D1A28;
    padding: 14px 18px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-info i { font-size: 22px; color: var(--accent-green); }
.chat-header-info h3 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.chat-users-count { font-size: 12px; color: #3D5A72; }
.chat-close-btn {
    background: rgba(255,255,255,.05); border: none;
    color: #3D5A72; font-size: 18px; cursor: pointer;
    padding: 8px; transition: all .2s;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
}
.chat-close-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 16px; background: #040C14;
    display: flex; flex-direction: column; gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #132234 transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #132234; border-radius: 2px; }

.chat-system-message {
    background: rgba(240,180,41,.07);
    border: 1px solid rgba(240,180,41,.2);
    color: var(--accent-green);
    padding: 10px 14px; border-radius: 8px;
    font-size: 12.5px;
    display: flex; align-items: center; gap: 8px;
}
.chat-system-message i { font-size: 14px; }

.chat-message {
    background: #0D1A28;
    padding: 10px 14px; border-radius: 9px;
    border-left: 3px solid var(--accent-green);
}
.chat-message-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 5px;
}
.chat-username { font-size: 12.5px; font-weight: 700; color: var(--accent-green); }
.chat-time { font-size: 10.5px; color: #3D5A72; }
.chat-message-text { font-size: 13px; color: #8FA8C0; line-height: 1.5; word-wrap: break-word; }

.chat-input-container {
    background: #07111C;
    padding: 12px 16px;
    display: flex; gap: 10px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.chat-input {
    flex: 1;
    background: #0D1A28;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff; font-size: 13px;
    transition: border-color .2s;
    font-family: 'Inter', sans-serif;
}
.chat-input:focus { outline: none; border-color: rgba(240,180,41,.35); }
.chat-input::placeholder { color: #3D5A72; }
.chat-send-btn {
    background: var(--accent-green);
    color: #040C14; border: none;
    border-radius: 50%; width: 40px; height: 40px;
    cursor: pointer; font-size: 15px;
    transition: all .2s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--accent-green-hover); transform: scale(1.08); }
.chat-send-btn:active { transform: scale(.95); }

/* ── RESPONSIVO ── */
@media (max-width: 768px) {
    .chat-modal { padding: 16px; align-items: flex-start; padding-top: 56px; }
    .tabbar-item span { font-size: 9px; }
    .tabbar-item i { font-size: 18px; }
}

@media (min-width: 769px) {
    .tabbar { display: none; }
}

@media (max-width: 768px) {
    body { padding-bottom: 70px; }
}
