/* ============================================
   CUSTOM UX/UI IMPROVEMENTS
   Baseado na referência 87A.APP
   Sobrepõe estilos do bundle Vue.js compilado
   ============================================ */

/* =============================================
   HEADER: Reestruturar para layout 87A.APP
   Logo em cima, botões Login/Registro embaixo
   Injetado via JavaScript (custom-header.js)
   ============================================= */

/* Toolbar volta ao normal — só com logo */
.main-page > ion-header ion-toolbar.toolbar {
    --padding-start: 0.75rem !important;
    --padding-end: 0.75rem !important;
}

/* Esconder os botões ORIGINAIS dentro da toolbar (serão clonados para fora) */
.main-page > ion-header ion-toolbar.toolbar .button-box {
    display: none !important;
}

/* Esconder o menu hamburger da toolbar principal */
.main-page > ion-header ion-toolbar.toolbar ion-buttons.menu-btn {
    display: none !important;
}

/* Logo maior */
.main-page > ion-header ion-toolbar.toolbar .logo-wrap .logo {
    max-height: 52px !important;
    height: 52px !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) !important;
}

/* === CONTAINER DE BOTÕES INJETADO (via JS) === */
.custom-header-buttons {
    display: flex !important;
    gap: 12px !important;
    padding: 0 0.75rem 0.75rem !important;
    background: transparent !important;
}

.custom-header-buttons .custom-btn {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.custom-header-buttons .custom-btn:active {
    opacity: 0.85 !important;
    transform: scale(0.98) !important;
}

.custom-header-buttons .custom-btn-login {
    background: var(--bg-inicio-HeaderBar-btn-login, linear-gradient(0deg, #0167CA -13.77%, #38A8FA 102.34%)) !important;
    color: var(--color-inicio-HeaderBar-btn-login, #fff) !important;
}

.custom-header-buttons .custom-btn-register {
    background: var(--bg-inicio-HeaderBar-btn-register, var(--gradient-green-green-1, linear-gradient(180deg, #34D058 0%, #22863A 100%))) !important;
    color: var(--color-inicio-HeaderBar-btn-register, #fff) !important;
}

/* Esconder os botões injetados quando o usuário está logado */
.custom-header-buttons.logged-in {
    display: none !important;
}

/* =============================================
   TABS DE PROVEDORES: Pill shape
   ============================================= */
ion-segment {
    --background: transparent !important;
}

ion-segment-button {
    --border-radius: 20px !important;
    --indicator-height: 100% !important;
    --padding-start: 16px !important;
    --padding-end: 16px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    min-height: 36px !important;
    margin: 4px 3px !important;
    text-transform: none !important;
}

/* =============================================
   BOTTOM NAVIGATION
   ============================================= */
ion-tab-bar {
    --border: none !important;
    height: 60px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3) !important;
}

ion-tab-button {
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

ion-tab-button ion-icon {
    font-size: 24px !important;
}

/* =============================================
   BANNERS/CARROSSEL
   ============================================= */
.swiper-slide img,
.banner-img,
.swiper-container img {
    border-radius: 12px !important;
}

/* =============================================
   CARDS DE JOGOS
   ============================================= */
.game-item,
.game-card {
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.game-item:active,
.game-card:active {
    transform: scale(0.97) !important;
}

.game-item img,
.game-card img {
    border-radius: 10px !important;
}

/* =============================================
   JACKPOT BANNER
   ============================================= */
.jackpot-wrap,
[class*="jackpot"] {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* =============================================
   MARQUEE/TICKER
   ============================================= */
.marquee-wrapper {
    border-radius: 8px !important;
}

/* =============================================
   FLOATING BUTTONS (suporte, mina)
   ============================================= */
.support ion-fab-button,
.red-packet-rain {
    --box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* =============================================
   MODAL/POPUP
   ============================================= */
ion-modal {
    --border-radius: 16px 16px 0 0 !important;
}

ion-modal .modal-wrapper {
    border-radius: 16px 16px 0 0 !important;
}

/* =============================================
   FOOTER: Melhorias visuais usando vars do tema
   ============================================= */
.footer-container .social-box {
    gap: 10px !important;
}

.footer-container .social-box ion-img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.footer-container .content p {
    font-size: 12px !important;
    line-height: 1.6 !important;
    opacity: 0.6 !important;
}

/* =============================================
   PWA INSTALL BAR (topo)
   ============================================= */
.pwa-header-wrap {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.pwa-header-wrap .btn-default {
    border-radius: 8px !important;
    font-weight: 700 !important;
}

/* =============================================
   SCROLLBAR CUSTOMIZADA
   ============================================= */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* =============================================
   INPUTS
   ============================================= */
ion-input,
ion-item {
    --border-radius: 10px !important;
}

/* =============================================
   BADGES/TOAST
   ============================================= */
ion-badge {
    --border-radius: 10px !important;
    font-weight: 700 !important;
    min-width: 20px !important;
    font-size: 11px !important;
}

ion-toast {
    --border-radius: 12px !important;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* =============================================
   TIPOGRAFIA
   ============================================= */
ion-label,
ion-text,
p, span, div {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* =============================================
   PULL TO REFRESH
   ============================================= */
ion-refresher {
    --ion-color-primary: var(--color-theme-base, #38A8FA) !important;
}

/* =============================================
   SIDEBAR (Menu Lateral): Botões iguais
   ============================================= */
.primaryBtn .button-box {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
}

.primaryBtn .button-box ion-button.login {
    flex: 1 !important;
    --background: var(--bg-inicio-HeaderBar-btn-login) !important;
    --border-radius: 8px !important;
    --color: var(--color-inicio-HeaderBar-btn-login, #fff) !important;
    min-height: 44px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.primaryBtn .button-box ion-button.register {
    --background: var(--bg-inicio-HeaderBar-btn-register) !important;
    --border-radius: 8px !important;
    --color: var(--color-inicio-HeaderBar-btn-register, #fff) !important;
    min-height: 44px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.primaryBtn .button-box .register-btn-warper {
    flex: 1 !important;
}

.primaryBtn .button-box .register-btn-warper ion-button.register {
    width: 100% !important;
}
