/**
 * Cookie banner stacking + mobile UX
 *
 * Magento core uses z-index: 3 on .message.global.cookie. Homepage promo grids
 * (#magento-grid-wrapper, position:relative; z-index:10) and other elevated
 * blocks paint above that. This file raises the bar on ALL viewports and loads
 * site-wide via Magento_Theme/layout/default.xml.
 *
 * Do NOT force display/visibility here — cookieNotices + cookie-head-fix.js
 * own show/hide based on user_allowed_save_cookie.
 */

/* -------------------------------------------------------------------------- */
/* Global stacking — all viewports                                            */
/* -------------------------------------------------------------------------- */
#notice-cookie-block,
.message.global.cookie {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Above content (10), sticky header (879), ox_bnav (800), assistant FAB (10050) */
    z-index: 10060;
    background: #ffee9c;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------------------------------------- */
/* Mobile UX                                                                  */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    #notice-cookie-block,
    .message.global.cookie {
        font-size: 1.1rem;
        padding: 15px;
        padding-bottom: max(15px, env(safe-area-inset-bottom));
        text-align: center;
    }

    #notice-cookie-block .content,
    .message.global.cookie .content {
        max-width: 100%;
    }

    #notice-cookie-block p,
    .message.global.cookie p {
        margin-bottom: 15px;
        line-height: 1.5;
    }

    #notice-cookie-block strong,
    .message.global.cookie strong {
        display: block;
        margin-bottom: 8px;
        font-size: 1.2rem;
    }

    #notice-cookie-block a,
    .message.global.cookie a {
        display: inline-block;
        padding: 5px 0;
        text-decoration: underline;
    }

    #notice-cookie-block .actions,
    .message.global.cookie .actions {
        margin-top: 15px;
    }

    #btn-cookie-allow {
        min-height: 44px;
        min-width: 44px;
        padding: 14px 28px;
        width: 100%;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 4px;
        margin-top: 10px;
    }

    #btn-cookie-allow span {
        display: block;
    }
}

@media screen and (max-width: 480px) {
    #notice-cookie-block,
    .message.global.cookie {
        padding: 12px;
        font-size: 1rem;
    }

    #notice-cookie-block strong,
    .message.global.cookie strong {
        font-size: 1.1rem;
    }

    #btn-cookie-allow {
        padding: 12px 24px;
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    #notice-cookie-block,
    .message.global.cookie {
        padding: 10px 15px;
    }

    #btn-cookie-allow {
        width: auto;
        min-width: 150px;
        display: inline-block;
    }
}
