/* ========================================================= */
/* MÓDULO DO MENU E ESTAÇÃO FLUTUANTE (COCKPIT)              */
/* ========================================================= */

/* Abas Dinâmicas */
.gpl-tab {
padding: 0.6rem 1.2rem;
border-radius: 12px;
font-weight: 600;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
border: 1px solid rgba(156, 163, 175, 0.25);
color: #9ca3af;
background: transparent;
display: flex;
align-items: center;

/* FIX: Previne a borda cortada/preta no carregamento */
box-sizing: border-box;
position: relative;
z-index: 1;
transform: translateZ(0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
flex-shrink: 0;
margin: 1px 2px;
outline: none;


}
.gpl-tab:focus { outline: none; }
.gpl-tab i { margin-right: 6px; color: var(--tab-color); opacity: 0.5; transition: all 0.3s; }
.gpl-tab.normal:hover { color: white; border-color: var(--tab-color); background: color-mix(in srgb, var(--tab-color) 5%, transparent); opacity: 1; z-index: 2; }
.gpl-tab.normal:hover i { opacity: 1; }
.gpl-tab.active { color: white; border-color: var(--tab-color); background: color-mix(in srgb, var(--tab-color) 12%, transparent); box-shadow: none; z-index: 3; }
.gpl-tab.active i { opacity: 1; text-shadow: 0 0 10px var(--tab-color); }

/* Botões Topo e Badge */
.gpl-btn-search { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.3s ease; cursor: pointer; }
.gpl-btn-search i { color: white; font-size: 1.1rem; transition: all 0.3s; }
.gpl-btn-search:hover { border-color: #38bdf8; box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.gpl-btn-search:hover i { color: #4ade80; }

/* CONTADOR TOTAL (HERDA COR DA ABA ATIVA MAGICALMENTE) */
.gpl-total-badge {
display: flex;
align-items: center;
gap: 8px;
padding: 0 16px;
height: 42px;
border-radius: 12px;
background: rgba(31, 41, 55, 0.6);
border: 1px solid color-mix(in srgb, var(--active-tab-color, #22d3ee) 30%, transparent);
color: white;
font-weight: 700;
cursor: default;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gpl-total-badge i {
color: var(--active-tab-color, #22d3ee);
transition: all 0.4s;
}
.gpl-total-badge:hover {
border-color: var(--active-tab-color, #22d3ee);
background: color-mix(in srgb, var(--active-tab-color, #22d3ee) 12%, transparent);
box-shadow: 0 0 18px color-mix(in srgb, var(--active-tab-color, #22d3ee) 35%, transparent);
transform: translateY(-2px);
}
.gpl-total-badge:hover i {
text-shadow: 0 0 10px var(--active-tab-color, #22d3ee);
filter: brightness(1.2);
}

/* Barra Pesquisa */
#search-overlay { border-color: rgba(34, 211, 238, 0.5); transition: all 0.3s ease; }
#search-overlay.active { opacity: 1; pointer-events: all; background: rgba(31, 41, 55, 0.95); backdrop-filter: blur(10px); }
#search-overlay.has-text { border-color: #0af6ff; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }

/* Ajustes Responsivos Mobile do Menu */
@media (max-width: 640px) {
.gpl-tab span { display: none; }
.gpl-tab { padding: 0.6rem; justify-content: center; }
.gpl-tab i { margin-right: 0; font-size: 1.2rem; }
.gpl-total-badge { padding: 0 10px; font-size: 0.85rem; height: 38px; }
.gpl-btn-search { width: 38px; height: 38px; }
}

/* ==========================================
COCKPIT INFERIOR (MENU FLUTUANTE SUPREMO)
========================================== */
.is-gpl-floating {
position: fixed !important;
bottom: 25px !important;
top: auto !important;
left: 50% !important;
transform: translateX(-50%) translateZ(0) !important;
z-index: 2147483647 !important;
background: rgba(10, 15, 29, 0.90) !important;
backdrop-filter: blur(15px) saturate(180%) !important;
border: 2px solid var(--active-tab-color, #22d3ee) !important;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9),
0 0 20px color-mix(in srgb, var(--active-tab-color, #22d3ee) 25%, transparent),
inset 0 15px 15px -15px color-mix(in srgb, var(--active-tab-color, #22d3ee) 40%, transparent) !important;
margin: 0 !important;
width: calc(100% - 24px) !important;
max-width: 1200px !important;
border-radius: 20px !important;
animation: cockpitDrop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

@keyframes cockpitDrop {
0% { bottom: -100px; opacity: 0; transform: translateX(-50%) scale(0.95); }
100% { bottom: 25px; opacity: 1; transform: translateX(-50%) scale(1); }
}

@media (min-width: 1024px) {
.is-gpl-floating {
width: max-content !important;
padding-left: 30px !important;
padding-right: 30px !important;
}
}

/* Efeito Mágico do Botão da Estação (+) */
#btn-gpl-open-cockpit { transition: all 0.4s ease; }
#btn-gpl-open-cockpit.is-cockpit-open {
border-color: #10b981 !important;
box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
background: color-mix(in srgb, #10b981 15%, transparent);
}
#btn-gpl-open-cockpit.is-cockpit-open i {
color: #facc15 !important;
text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
transform: rotate(45deg);
}