/* BH Push Notifications — frontend styles */

/* Mount point is invisible; it just hosts the elements */
#bhpn-container,
#bhpn-container-auto {
    display: contents;
}

/* Notification box */
.bhpn-notification {
    position: fixed;
    z-index: 2147483647; /* maximum signed 32-bit int — on top of everything */
    width: var(--bhpn-w, 340px);
    max-width: calc(100vw - 24px);
    min-height: var(--bhpn-mh, 80px);
    background: var(--bhpn-bg, #FFF9D6);
    color: var(--bhpn-text, #1A1A1A);
    border: var(--bhpn-bw, 2px) solid var(--bhpn-border, #D4AF37);
    border-radius: var(--bhpn-br, 12px);
    padding: 18px 40px 18px 18px;
    box-shadow: var(--bhpn-shadow, 0 8px 24px rgba(0,0,0,0.15));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--bhpn-fs, 15px);
    font-weight: var(--bhpn-fw, 500);
    line-height: 1.45;
    text-align: var(--bhpn-ta, center);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    animation: bhpn-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bhpn-fade-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

/* Centred horizontal positions need their translate preserved while fading */
.bhpn-notification.bhpn-pos-top-center,
.bhpn-notification.bhpn-pos-bottom-center {
    animation: bhpn-fade-in-x 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bhpn-fade-in-x {
    from { opacity: 0; transform: translateX(-50%) scale(0.94); }
    to   { opacity: 1; transform: translateX(-50%); }
}
.bhpn-notification.bhpn-pos-center {
    animation: bhpn-fade-in-xy 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bhpn-fade-in-xy {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.bhpn-notification.bhpn-leaving {
    animation: bhpn-fade-out 0.25s ease forwards;
    pointer-events: none;
}
@keyframes bhpn-fade-out {
    to { opacity: 0; transform: scale(0.94); }
}

/* Stacked notifications offset themselves a bit */
.bhpn-notification[data-stack-index="1"] { margin-top: 12px; }
.bhpn-notification[data-stack-index="2"] { margin-top: 24px; }
.bhpn-notification[data-stack-index="3"] { margin-top: 36px; }
.bhpn-notification[data-stack-index="4"] { margin-top: 48px; }
.bhpn-notification[data-stack-index="5"] { margin-top: 60px; }

.bhpn-notification .bhpn-text {
    flex: 1;
    width: 100%;
}

.bhpn-notification .bhpn-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: var(--bhpn-close, #1A1A1A);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    font-family: inherit;
    font-weight: 400;
}
.bhpn-notification .bhpn-close:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}
.bhpn-notification .bhpn-close:focus {
    outline: 2px solid var(--bhpn-border, #D4AF37);
    outline-offset: 1px;
}

/* MOBILE — full-width box with safe margins */
@media (max-width: 600px) {
    .bhpn-notification {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
    }
    .bhpn-notification.bhpn-pos-top-left,
    .bhpn-notification.bhpn-pos-top-right,
    .bhpn-notification.bhpn-pos-top-center {
        top: 10px !important;
        bottom: auto !important;
    }
    .bhpn-notification.bhpn-pos-bottom-left,
    .bhpn-notification.bhpn-pos-bottom-right,
    .bhpn-notification.bhpn-pos-bottom-center {
        bottom: 10px !important;
        top: auto !important;
    }
    .bhpn-notification.bhpn-pos-center {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    @keyframes bhpn-fade-in-xy {
        from { opacity: 0; transform: translateY(-50%) scale(0.94); }
        to   { opacity: 1; transform: translateY(-50%); }
    }
}

/* ============================================================
   FULLSCREEN WRAPPER (for cross-domain Zoom iframes)
   ============================================================ */
.bhpn-fs-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.bhpn-fs-wrap .bhpn-fs-content {
    width: 100%;
    height: 100%;
}

.bhpn-fs-wrap iframe {
    display: block;
    max-width: 100%;
}

/* When the wrap is fullscreen, fill the entire screen */
.bhpn-fs-wrap:fullscreen,
.bhpn-fs-wrap:-webkit-full-screen {
    background: #000;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bhpn-fs-wrap:fullscreen .bhpn-fs-content,
.bhpn-fs-wrap:-webkit-full-screen .bhpn-fs-content {
    width: 100vw;
    height: 100vh;
}

.bhpn-fs-wrap:fullscreen iframe,
.bhpn-fs-wrap:-webkit-full-screen iframe {
    width: 100vw !important;
    height: 100vh !important;
}

/* Custom fullscreen button */
.bhpn-fs-btn {
    position: absolute;
    z-index: 100;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    border: 0;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: background 0.15s, transform 0.15s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.bhpn-fs-btn:hover {
    background: rgba(0, 0, 0, 0.92);
    transform: scale(1.04);
}
.bhpn-fs-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }

.bhpn-fs-top-left     { top: 12px;    left: 12px;  }
.bhpn-fs-top-right    { top: 12px;    right: 12px; }
.bhpn-fs-bottom-left  { bottom: 12px; left: 12px;  }
.bhpn-fs-bottom-right { bottom: 12px; right: 12px; }
