/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT NOTIFICATIONS — bar strips + popup card
   Markup: resources/views/shop/partials/notifications.blade.php
   Logic:  public/shop/assets/js/notifications.js
   Elements start hidden and are revealed by JS only when not already dismissed,
   so a closed notification never flashes on screen.
═══════════════════════════════════════════════════════════════════════════ */

/* ── Bar strip (sits above the topbar, in normal flow) ───────────────────── */
.mh-notif-bars { flex-shrink: 0; }

.mh-notif-bar {
    display: none;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 48px;
    font-size: .85rem;
    color: #fff;
    background: linear-gradient(90deg, var(--primary), var(--primary-h));
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.mh-notif-bar.is-visible { display: flex; }

.mh-notif-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.mh-notif-bar-icon { font-size: 1.1rem; opacity: .85; }
.mh-notif-bar-text { font-weight: 500; }

.mh-notif-bar-btn {
    flex-shrink: 0;
    background: #fff;
    color: var(--primary-h);
    font-weight: 700;
    font-size: .8rem;
    padding: 4px 16px;
    border-radius: 999px;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
}
.mh-notif-bar-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }

.mh-notif-bar-close {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: inherit;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, .18);
    transition: background .15s;
}
.mh-notif-bar-close:hover { background: rgba(255, 255, 255, .35); }

/* ── Popup ───────────────────────────────────────────────────────────────── */
.mh-notif-popup-layer {
    display: none;
    position: fixed;
    z-index: 1200;
}
.mh-notif-popup-layer.is-visible { display: flex; }

/* Center → dim full-screen backdrop with a centered card. */
.mh-notif-popup-layer--center {
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    animation: mh-notif-fade .25s ease;
}
/* Corners → no backdrop, anchored card. */
.mh-notif-popup-layer--bottom-left { inset-inline-start: 20px; bottom: 20px; }
.mh-notif-popup-layer--bottom-right { inset-inline-end: 20px; bottom: 20px; }

.mh-notif-popup {
    position: relative;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    background: var(--bg-card);
    color: var(--text-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: mh-notif-pop .3s cubic-bezier(.16, 1, .3, 1);
}
.mh-notif-popup-layer--center .mh-notif-popup { max-width: 440px; }
.mh-notif-popup-layer--bottom-left .mh-notif-popup,
.mh-notif-popup-layer--bottom-right .mh-notif-popup { width: 340px; }

.mh-notif-popup-close {
    position: absolute;
    inset-inline-start: 10px;
    top: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, .35);
    transition: background .15s;
}
.mh-notif-popup-close:hover { background: rgba(0, 0, 0, .6); }

.mh-notif-popup-media img {
    width: 100%;
    max-height: 230px;
    object-fit: cover;
    display: block;
}

.mh-notif-popup-body { padding: 24px 26px; text-align: center; }
/* No image above → reserve top room so the close button never overlaps the text. */
.mh-notif-popup-body:first-child { padding-top: 48px; }
.mh-notif-popup-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 10px;
    color: inherit;
}
.mh-notif-popup-text {
    font-size: .95rem;
    line-height: 1.9;
    color: var(--text-2);
}
.mh-notif-popup-text > :first-child { margin-top: 0; }
.mh-notif-popup-text > :last-child  { margin-bottom: 0; }
.mh-notif-popup-text p  { margin: 0 0 .7em; }
.mh-notif-popup-text p:empty { display: none; }
.mh-notif-popup-text h1,
.mh-notif-popup-text h2,
.mh-notif-popup-text h3 { color: var(--text-1); font-weight: 700; margin: .2em 0 .5em; }
.mh-notif-popup-text img { max-width: 100%; height: auto; border-radius: 8px; }
.mh-notif-popup-text ul,
.mh-notif-popup-text ol { padding-right: 1.4em; margin: .4em 0; }
.mh-notif-popup-text a  { color: inherit; text-decoration: underline; }
.mh-notif-popup-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 28px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    transition: background .15s, transform .15s;
}
.mh-notif-popup-btn:hover { background: var(--primary-h); transform: translateY(-1px); }

@keyframes mh-notif-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mh-notif-pop {
    from { opacity: 0; transform: scale(.94) translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
    .mh-notif-bar { padding: 8px 40px; font-size: .8rem; }
    .mh-notif-popup-layer--bottom-left,
    .mh-notif-popup-layer--bottom-right { inset-inline: 12px; bottom: 12px; }
    .mh-notif-popup-layer--bottom-left .mh-notif-popup,
    .mh-notif-popup-layer--bottom-right .mh-notif-popup { width: auto; }
}
