/*
 * Push Notification Widget – 4D King Results
 * Mobile‑first bottom sheet, desktop floating card.
 * No overlay, floats above footer, below admin bar.
 */

/* --- Variables (fallback – your theme’s :root will override these) --- */
:root {
    --push-bg:       #ffffff;
    --push-text:     #111111;
    --push-muted:    #555555;
    --push-primary:  #cc0000;
    --push-primary-hover: #a00000;
    --push-radius:   16px;
    --push-shadow:   0 -2px 20px rgba(0,0,0,0.15);
    --push-zindex:   9999;
}

/* --- Mobile: bottom sheet (default) --- */
.push-notif {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--push-bg);
    box-shadow: var(--push-shadow);
    border-radius: var(--push-radius) var(--push-radius) 0 0;   /* top rounded corners only */
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    z-index: var(--push-zindex);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.push-notif--visible {
    transform: translateY(0);
    opacity: 1;
}

/* --- Inner layout --- */
.push-notif__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.push-notif__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--push-text);
}

.push-notif__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--push-muted);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.push-notif__close:hover {
    background: #f0f0f0;
    color: var(--push-text);
}

.push-notif__text {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--push-muted);
}

.push-notif__btn {
    display: block;
    width: 100%;
    background: var(--push-primary);
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    min-height: 44px;
}

.push-notif__btn:hover,
.push-notif__btn:focus-visible {
    background: var(--push-primary-hover);
    outline: none;
    box-shadow: 0 0 0 3px rgba(204,0,0,0.3);
}

/* --- Desktop: floating card (min-width 768px) --- */
@media (min-width: 768px) {
    .push-notif {
        left: auto;
        right: 20px;
        bottom: 20px;
        width: 350px;
        max-width: 90vw;
        border-radius: var(--push-radius);   /* all corners rounded */
        padding: 20px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    }
}