/* CDLM – Mobile Header 1.1.0 (BuddyBoss)
 * 1) Oculta la lupa del buscador en el header móvil.
 * 2) Estilos de la bandera de idioma clonada (solo bandera, sin planeta).
 * 3) Estilos del avatar inyectado (logueados).
 * 4) Estilos del botón LOGIN inyectado por JS (solo visitantes).
 * Todo scropeado a .bb-mobile-header-wrapper: en desktop no cambia nada. */

.bb-mobile-header-wrapper .header-search-link,
.bb-mobile-header-wrapper .search-separator {
    display: none !important;
}

/* --- Bandera de idioma (clon del switcher de WPML) --- */
.bb-mobile-header-wrapper .cdlm-mobile-lang {
    list-style: none;
    display: flex;
    align-items: center;
    /* BuddyBoss fuerza height: var(--bb-header-height) en .header-aside > *;
       lo anulamos para que tenga altura compacta propia. */
    height: auto;
    margin: 0 10px 0 0;
    padding: 0;
}

.bb-mobile-header-wrapper .cdlm-mobile-lang > a {
    display: inline-flex;
    align-items: center;
    padding: 0;
    line-height: 1;
}

/* Sin planeta en móvil tampoco: solo la banderita */
.bb-mobile-header-wrapper .cdlm-mobile-lang ._mi,
.bb-mobile-header-wrapper .cdlm-mobile-lang .bb-icon-globe {
    display: none !important;
}

.bb-mobile-header-wrapper .cdlm-mobile-lang .wpml-ls-flag {
    width: 22px;
    height: auto;
    display: block;
    margin: 0;
}

/* --- Avatar (logueados): reemplaza al botón LOGIN --- */
.bb-mobile-header-wrapper .cdlm-mobile-avatar {
    display: inline-flex;
    align-items: center;
    /* Anula el height forzado de BuddyBoss en .header-aside > * */
    height: auto;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.bb-mobile-header-wrapper .cdlm-mobile-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: block;
}

/* --- Botón LOGIN (visitantes) --- */
.bb-mobile-header-wrapper .cdlm-mobile-login {
    display: inline-flex;
    align-items: center;
    align-self: center;
    /* BuddyBoss fuerza height: var(--bb-header-height) en .header-aside > *;
       lo anulamos para que el botón tenga su altura compacta propia. */
    height: auto;
    border: 1px solid #d71920;
    border-radius: 4px;
    background: #ffffff;
    color: #d71920;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 3px 3px;
    margin-right: 0;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.2;
}

.bb-mobile-header-wrapper .cdlm-mobile-login:hover,
.bb-mobile-header-wrapper .cdlm-mobile-login:active {
    background: #d71920;
    color: #ffffff;
    text-decoration: none;
}

/* El theme fuerza `padding-right: 0 !important` en el último hijo del aside
   móvil (.bb-mobile-header .header-aside > :last-child), lo que dejaba el texto
   del botón pegado al borde derecho. Se pisa con mayor especificidad para que
   el padding interior quede equilibrado. */
.bb-mobile-header-wrapper .header-aside > .cdlm-mobile-login:last-child {
    padding-right: 3px !important;
}
