/**
 * WC Push Notify – Frontend Styles
 * Soft opt-in popup + "Notify Me" button.
 */

/* ── Popup overlay ──────────────────────────────────────────────────────────── */
#wcpn-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    max-width: 360px;
    width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #222;
    pointer-events: none;
}

#wcpn-popup.wcpn-popup--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.wcpn-popup__inner {
    padding: 24px;
    position: relative;
}

/* ── Close button ───────────────────────────────────────────────────────────── */
.wcpn-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.wcpn-popup__close:hover {
    color: #333;
}

/* ── Icon ───────────────────────────────────────────────────────────────────── */
.wcpn-popup__icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 10px;
}

/* ── Title ──────────────────────────────────────────────────────────────────── */
.wcpn-popup__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
}

/* ── Subtitle ───────────────────────────────────────────────────────────────── */
.wcpn-popup__sub {
    margin: 0 0 8px;
    color: #555;
    font-size: 13px;
}

/* ── Benefits list ──────────────────────────────────────────────────────────── */
.wcpn-popup__list {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #444;
}
.wcpn-popup__list li {
    padding: 2px 0;
}

/* ── Privacy note ───────────────────────────────────────────────────────────── */
.wcpn-popup__privacy {
    font-size: 11px;
    color: #999;
    margin: 0 0 16px;
}

/* ── Action buttons ─────────────────────────────────────────────────────────── */
.wcpn-popup__actions {
    display: flex;
    gap: 10px;
}

.wcpn-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}
.wcpn-btn:active {
    transform: scale(0.97);
}

.wcpn-btn--primary {
    background: #1a1a1a;
    color: #fff;
}
.wcpn-btn--primary:hover {
    background: #333;
}

.wcpn-btn--secondary {
    background: #f0f0f0;
    color: #555;
}
.wcpn-btn--secondary:hover {
    background: #e0e0e0;
}

/* ── "Notify Me" button ─────────────────────────────────────────────────────── */
button[data-wcpn-notify-restock],
.wcpn-notify-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 18px;
    background: #fff;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
button[data-wcpn-notify-restock]:hover,
.wcpn-notify-btn:hover {
    background: #1a1a1a;
    color: #fff;
}
button[data-wcpn-notify-restock]:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Mobile adjustments ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #wcpn-popup {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}
