/**
 * The Body Shop — MySticky Welcome Bar / header.
 * La altura se mide en JS. Este archivo NO aplica desplazamientos fijos.
 */

/* El contenido del widget activo debe determinar la altura real de la barra. */
.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3.mysticky-welcomebar-position-top {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
}

.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-fixed-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px 12px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-content {
    min-width: 0 !important;
    max-width: 100% !important;
}

.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-content p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .msb-front-flex,
.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-btn {
    position: static !important;
}

/* Esta variable incluye tanto MyStickyBar como la barra de administración, si existe. */
html.tbs-mysticky-header-sync body:not(.admin-bar) .container[data-site-container] > .header-sections,
html.tbs-mysticky-header-sync body:not(.admin-bar) .container > .header-sections,
html.tbs-mysticky-header-sync body.admin-bar .container[data-site-container] > .header-sections,
html.tbs-mysticky-header-sync body.admin-bar .container > .header-sections {
    top: var(--tbs-mysticky-header-top, 0px) !important;
}

@media (max-width: 749px) {
    .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-fixed-wrap {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        padding: 7px 36px 7px 12px !important;
    }

    .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-content {
        width: 100% !important;
        flex: 0 1 auto !important;
        text-align: center !important;
    }

    .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-content p {
        line-height: 1.25 !important;
    }

    .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .msb-front-flex {
        display: flex !important;
        width: auto !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }

    .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-3 .mysticky-welcomebar-btn {
        display: block !important;
        margin: 0 !important;
    }

    /* El wrapper interior NO suma una segunda vez la altura de la barra. */
    html.tbs-mysticky-header-sync body .container[data-site-container] > .header-sections .header__wrapper,
    html.tbs-mysticky-header-sync body .container > .header-sections .header__wrapper {
        top: 0 !important;
    }
}
