/**
 * Metal-Gum — shared mobile refinements for the FSE templates.
 * Mobile pages start directly with the primary header. The auxiliary
 * credibility strip and opening-hours topbar remain available on desktop.
 */

@media (max-width: 768px) {
    .wp-block-stellar-theme-spec-strip,
    .stellar-spec-strip,
    .wp-block-stellar-theme-topbar,
    .stellar-topbar {
        display: none !important;
    }

    .wp-block-stellar-theme-header-container {
        --stellar-header-hamburger-color: #ffffff !important;
        --stellar-header-sidebar-close-color: #ffffff !important;
    }

    .stellar-header-sidebar-content > .stellar-mega-menu-mobile {
        order: 1;
    }

    .stellar-header-sidebar-content > .metal-gum-mobile-language-switcher {
        order: 2;
        box-sizing: border-box;
        width: 100%;
        margin-top: auto;
        padding: 18px 22px 22px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        background: #0f1726;
    }

    .metal-gum-mobile-language-switcher .stellar-language-switcher__link {
        color: #ffffff;
    }

    .metal-gum-footer-columns {
        padding-top: 44px !important;
        padding-bottom: 36px !important;
    }
}

@media (max-width: 390px) {
    main .stellar-container-item-inner:has(> .wp-block-stellar-theme-custom-button ~ .wp-block-stellar-theme-custom-button),
    main .stellar-container-item-inner:has(> .stellar-custom-button ~ .stellar-custom-button) {
        flex-wrap: wrap !important;
    }

    main .stellar-container-item-inner:has(> .wp-block-stellar-theme-custom-button ~ .wp-block-stellar-theme-custom-button) > .wp-block-stellar-theme-custom-button,
    main .stellar-container-item-inner:has(> .stellar-custom-button ~ .stellar-custom-button) > .stellar-custom-button {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        --btn-width-mobile: 100%;
    }

    main .stellar-container-item-inner:has(> .wp-block-stellar-theme-custom-button ~ .wp-block-stellar-theme-custom-button) > .wp-block-stellar-theme-custom-button .stellar-custom-button-tag,
    main .stellar-container-item-inner:has(> .stellar-custom-button ~ .stellar-custom-button) > .stellar-custom-button .stellar-custom-button-tag {
        width: 100%;
    }
}

/* Preserve the logo, offer CTA and a fully visible hamburger at 320 px. */
@media (max-width: 340px) {
    .stellar-header-container-inner > .stellar-logo-wrapper {
        flex: 0 1 100px;
        width: 100px !important;
        max-width: 100px;
    }

    .stellar-header-container-inner > .stellar-custom-button,
    .stellar-header-container-inner > .wp-block-stellar-theme-custom-button {
        flex: 0 1 128px;
        width: 128px !important;
        max-width: 128px;
        --btn-width-mobile: 128px;
    }

    .stellar-header-container-inner > .stellar-custom-button .stellar-custom-button-tag,
    .stellar-header-container-inner > .wp-block-stellar-theme-custom-button .stellar-custom-button-tag {
        width: 100% !important;
    }
}
