/* ============================================================
   Storzen Notify — Frontend Popup Styles v1.2
   CSS Custom Properties for color customization
   ============================================================ */

/* ── CSS Variables (set by PHP via inline style on body) ── */
:root {
    --szn-accent:     #7f54b3;
    --szn-bg:         #ffffff;
    --szn-text:       #1a1a1a;
    --szn-meta:       #888888;
    --szn-radius:     10px;
}

/* ── Base popup ── */
.storzen-notify-popup {
    position: fixed;
    z-index: 99999;
    max-width: 380px;
    width: calc(100% - 32px);
    background: var(--szn-bg);
    border-radius: var(--szn-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--szn-text);
    cursor: pointer;
    bottom: 28px;
    left: 20px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

/* ── Position variants ── */
.storzen-notify-popup.position-bottom-right { left: auto; right: 20px; }

/* ── Visible state ── */
.storzen-notify-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: flex !important;
}

/* ============================================================
   STYLE 1: Card (default) — border-left accent
   ============================================================ */
.storzen-notify-popup.style-card {
    border-left: 5px solid var(--szn-accent);
}

/* ============================================================
   STYLE 2: Minimal — clean, no border, subtle shadow
   ============================================================ */
.storzen-notify-popup.style-minimal {
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 12px 14px;
    gap: 10px;
}
.storzen-notify-popup.style-minimal .storzen-notify-popup__img,
.storzen-notify-popup.style-minimal .storzen-notify-popup__img-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 6px;
}

/* ============================================================
   STYLE 3: Banner — full-width, colored top bar
   ============================================================ */
.storzen-notify-popup.style-banner {
    max-width: 440px;
    border-top: 4px solid var(--szn-accent);
    border-radius: 0 0 10px 10px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.12);
    padding: 14px 20px;
}
.storzen-notify-popup.style-banner.is-visible {
    transform: translateX(-50%) translateY(0);
}
.storzen-notify-popup.style-banner.position-bottom-right {
    left: 50%;
    right: auto;
}

/* ── Product image ── */
.storzen-notify-popup__img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.storzen-notify-popup__img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #ede7f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

/* ── Text ── */
.storzen-notify-popup__body {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.storzen-notify-popup__name {
    font-weight: 700;
    color: var(--szn-text);
    font-size: 14px;
}

.storzen-notify-popup__product {
    color: var(--szn-accent);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 250px;
    font-size: 14px;
}

.storzen-notify-popup__meta {
    color: var(--szn-meta);
    font-size: 12px;
    margin-top: 4px;
}

/* ── Close button ── */
.storzen-notify-popup__close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #bbb;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}
.storzen-notify-popup__close:hover { color: #555; }

/* ── Low stock ── */
.storzen-notify-popup__stock-alert {
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}
.storzen-notify-popup__img-placeholder--stock  { background: #fff7ed !important; }
.storzen-notify-popup__img-placeholder--visitor { background: #f0fdf4 !important; }

/* ── Visitor count ── */
.storzen-notify-popup__visitor-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--szn-text);
}

/* ── Demo badge ── */
.storzen-notify-popup__demo-badge {
    display: inline-block;
    background: #fef9c3;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Mobile hide + responsive ── */
@media (max-width: 480px) {
    .storzen-notify-popup.hide-on-mobile {
        display: none !important;
    }
    .storzen-notify-popup:not(.style-banner) {
        max-width: 100%;
        width: calc(100% - 32px);
        bottom: 16px;
        left: 16px !important;
        right: 16px !important;
    }
    .storzen-notify-popup.style-banner {
        max-width: 100%;
        width: 100%;
        left: 0 !important;
        transform: translateY(8px) !important;
        border-radius: 0;
    }
    .storzen-notify-popup.style-banner.is-visible {
        transform: translateY(0) !important;
    }
}

/* ── Sale Alert ── */
.storzen-notify-popup__sale-badge {
    display: inline-block;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.storzen-notify-popup__sale-price {
    color: #c2410c;
    font-weight: 700;
    font-size: 13px;
}

.storzen-notify-popup__regular-price {
    color: #9ca3af;
    font-size: 12px;
    text-decoration: line-through;
}

.storzen-notify-popup__img-placeholder--sale {
    background: #fff7ed !important;
}
