/* ============================================================================
   TABS ULTRA PREMIUM - GLOBAL V2.0
   Autor: CloudMaster (Sonnet 4.5)
   Data: 30/12/2025
   Inspiração: Apple Vision Pro + Linear + Stripe
   ============================================================================ */

/* Container das abas */
.flagos-tab-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
    position: relative;
}

/* ============================================================================
   ABA INDIVIDUAL - ULTRA PREMIUM
   ============================================================================ */

.flagos-tab-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;

    /* Typography */
    font-family: var(--font-primary, 'Space Grotesk', sans-serif);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    /* Visual - Transparent base */
    color: var(--text-secondary, rgba(255, 255, 255, 0.5));
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px; /* Pill shape */

    /* Interação */
    cursor: pointer;
    user-select: none;
    overflow: hidden;

    /* Transição elástica (spring physics) */
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), /* Elastic */
        color 0.25s ease,
        border-color 0.3s ease,
        box-shadow 0.35s ease;

    /* Performance */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

/* ============================================================================
   SHIMMER EFFECT - Gradiente animado no background
   ============================================================================ */

.flagos-tab-item::before {
    content: '';
    position: absolute;
    inset: -2px; /* Expande além da borda */
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(var(--color-primary-rgb, 255, 69, 0), 0.3) 60deg,
        rgba(var(--color-secondary-rgb, 255, 200, 0), 0.5) 120deg,
        transparent 180deg,
        rgba(var(--color-primary-rgb, 255, 69, 0), 0.4) 240deg,
        transparent 360deg
    );
    border-radius: 999px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    animation: shimmer-rotate 8s linear infinite;
}

@keyframes shimmer-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================================
   HOVER STATE - Scale + Glow pulsante
   ============================================================================ */

.flagos-tab-item:hover {
    transform: translateY(-3px) scale(1.06);
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
    border-color: rgba(var(--color-primary-rgb, 255, 69, 0), 0.4);

    /* Glow suave */
    box-shadow:
        0 0 20px rgba(var(--color-primary-rgb, 255, 69, 0), 0.25),
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.flagos-tab-item:hover::before {
    opacity: 1; /* Ativa shimmer */
    animation-duration: 4s; /* Acelera rotação */
}

/* Parallax sutil no ícone (hover) */
.flagos-tab-item:hover i,
.flagos-tab-item:hover svg {
    transform: translateY(-1px) scale(1.1);
}

/* ============================================================================
   ACTIVE STATE - Gradiente sólido + Brilho máximo
   ============================================================================ */

.flagos-tab-item.active {
    color: #FFFFFF; /* Branco puro */
    font-weight: 800; /* Extra bold */

    /* Gradiente sólido Fire theme */
    background:
        linear-gradient(135deg,
            rgba(var(--color-primary-rgb, 255, 69, 0), 0.95) 0%,
            rgba(var(--color-secondary-rgb, 255, 200, 0), 0.85) 100%
        );

    border-color: rgba(var(--color-secondary-rgb, 255, 200, 0), 0.7);

    /* Glow FORTE + Sombra profunda */
    box-shadow:
        0 0 35px rgba(var(--color-primary-rgb, 255, 69, 0), 0.6),
        0 0 60px rgba(var(--color-secondary-rgb, 255, 200, 0), 0.35),
        0 8px 28px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);

    /* Sobe acima dos outros */
    transform: translateY(-4px) scale(1.08);
    z-index: 10;

    /* Pulse sutil contínuo */
    animation: tab-active-pulse 3s ease-in-out infinite;
}

@keyframes tab-active-pulse {
    0%, 100% {
        box-shadow:
            0 0 35px rgba(var(--color-primary-rgb, 255, 69, 0), 0.6),
            0 0 60px rgba(var(--color-secondary-rgb, 255, 200, 0), 0.35),
            0 8px 28px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    50% {
        box-shadow:
            0 0 45px rgba(var(--color-primary-rgb, 255, 69, 0), 0.75),
            0 0 80px rgba(var(--color-secondary-rgb, 255, 200, 0), 0.5),
            0 10px 32px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Shimmer acelera quando ativo */
.flagos-tab-item.active::before {
    opacity: 0.6;
    animation-duration: 3s;
}

/* Ícone ativo - Micro bounce */
.flagos-tab-item.active i,
.flagos-tab-item.active svg {
    animation: icon-bounce 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================================================
   RIPPLE EFFECT - Clique visual (sound effect)
   ============================================================================ */

.flagos-tab-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 70%
    );
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.flagos-tab-item:active::after {
    animation: ripple-click 0.6s ease-out;
}

@keyframes ripple-click {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

/* ============================================================================
   ÍCONES - Smooth transitions
   ============================================================================ */

.flagos-tab-item i,
.flagos-tab-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   VARIANTS - Zeus (centralizado), etc
   ============================================================================ */

.zeus-nav-tabs.flagos-tab-nav {
    justify-content: center;
    padding: 1.5rem 0;
}

/* ============================================================================
   LIGHT MODE - Adaptação cores
   ============================================================================ */

body[data-mode="light"] .flagos-tab-item {
    color: rgba(10, 10, 10, 0.6);
    border-color: rgba(0, 0, 0, 0.12);
}

body[data-mode="light"] .flagos-tab-item:hover {
    color: rgba(10, 10, 10, 0.92);
    border-color: rgba(var(--color-primary-rgb), 0.3);
    box-shadow:
        0 0 15px rgba(var(--color-primary-rgb), 0.15),
        0 6px 20px rgba(0, 0, 0, 0.1);
}

body[data-mode="light"] .flagos-tab-item.active {
    color: #FFFFFF;
    background:
        linear-gradient(135deg,
            rgba(var(--color-primary-rgb), 0.9),
            rgba(var(--color-secondary-rgb), 0.8)
        );
    box-shadow:
        0 0 30px rgba(var(--color-primary-rgb), 0.4),
        0 0 50px rgba(var(--color-secondary-rgb), 0.25),
        0 8px 28px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   MOBILE - Responsivo
   ============================================================================ */

@media (max-width: 768px) {
    .flagos-tab-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .flagos-tab-item {
        padding: 0.7rem 1.25rem;
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .flagos-tab-item i,
    .flagos-tab-item svg {
        width: 16px;
        height: 16px;
    }

    /* Simplifica animações no mobile (performance) */
    .flagos-tab-item:hover {
        transform: scale(1.03);
    }

    .flagos-tab-item.active {
        transform: scale(1.05);
    }

    .flagos-tab-item::before {
        animation: none; /* Remove shimmer (GPU mobile) */
    }
}

/* ============================================================================
   ACCESSIBILITY - Focus visível
   ============================================================================ */

.flagos-tab-item:focus-visible {
    outline: 2px solid rgba(var(--color-primary-rgb), 0.6);
    outline-offset: 3px;
}

/* ============================================================================
   DISABLED STATE - Se precisar
   ============================================================================ */

.flagos-tab-item:disabled,
.flagos-tab-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
