/**
 * HMVIP BuddyX Header Fixes
 *
 * Estilos de suporte para as correções do header BuddyX Pro.
 *
 * @package   HMVIP\Core
 * @since     4.3.1
 * @license   Proprietary
 */

/* ==========================================================================
   1. Botão light/dark dentro do header (somente ícone, sem círculo)
   ========================================================================== */

.buddypress-icons-wrapper .switch-mode,
.buddypress-icons-wrapper .hmvip-header-theme-toggle {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    margin: 0 4px !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
}

.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 32px;
    height: 32px;
    padding: 4px;
    border: 0;
    border-radius: 0 !important;
    background: transparent !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 1;
    -webkit-transition: opacity 0.2s linear;
    -o-transition: opacity 0.2s linear;
    transition: opacity 0.2s linear;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    transform: none !important;
}

.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode:hover,
.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode:focus,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode:hover,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode:focus {
    opacity: 0.7;
    background: transparent !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    transform: none !important;
}

.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode .color-mode,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode .color-mode {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    background-color: transparent !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* O BuddyX aplica filter: invert() em .color-mode globalmente. No tema claro,
   isso torna o SVG da lua (já escuro) branco e invisível. Resetamos o filtro
   apenas no modo claro, mantendo o ícone visível sem círculo de fundo. */
.buddyx-light-mode .buddypress-icons-wrapper .switch-mode .buddyx-switch-mode .color-mode,
.buddyx-light-mode .buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode .color-mode,
.light-mode .buddypress-icons-wrapper .switch-mode .buddyx-switch-mode .color-mode,
.light-mode .buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode .color-mode {
    -webkit-filter: none !important;
    filter: none !important;
}

/* Feedback de hover/focus sem círculo, quadrado ou sombra. O ícone é um SVG
   monocromático carregado via background-image pelo tema; mantemos essa imagem
   e apenas suavizamos a opacidade, igual aos ícones nativos do menu BuddyBoss. */
.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode:hover .color-mode,
.buddypress-icons-wrapper .switch-mode .buddyx-switch-mode:focus .color-mode,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode:hover .color-mode,
.buddypress-icons-wrapper .hmvip-header-theme-toggle .buddyx-switch-mode:focus .color-mode {
    background-color: transparent !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    transform: none !important;
}

/* ==========================================================================
   2. Logo light/dark sem quebrar src/srcset
   ========================================================================== */

.site-branding .hmvip-logo-link {
    display: inline-block;
    vertical-align: middle;
}

.site-branding .hmvip-logo-link img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-branding .hmvip-logo-dark {
    display: none !important;
}

.dark-mode .site-branding .hmvip-logo-light,
.buddyx-dark-mode .site-branding .hmvip-logo-light,
[data-theme="dark"] .site-branding .hmvip-logo-light {
    display: none !important;
}

.dark-mode .site-branding .hmvip-logo-dark,
.buddyx-dark-mode .site-branding .hmvip-logo-dark,
[data-theme="dark"] .site-branding .hmvip-logo-dark {
    display: block !important;
}
