/* ============================================================
   Fake Sale Notifications - Frontend Styles
   Responsive + WoodMart mobile-nav aware
   ============================================================ */

#fsn-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    max-width: 360px;
    width: 360px;
}

/* Desktop position variants */
#fsn-container.fsn-bottom-right  { bottom: 20px; right: 20px; }
#fsn-container.fsn-bottom-left   { bottom: 20px; left: 20px; }
#fsn-container.fsn-top-right     { top: 20px; right: 20px; }
#fsn-container.fsn-top-left      { top: 20px; left: 20px; }
#fsn-container.fsn-bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }

/* Notification card */
.fsn-notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 12px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s ease, transform .4s ease;
    position: relative;
}

#fsn-container.fsn-top-right .fsn-notification,
#fsn-container.fsn-top-left  .fsn-notification {
    transform: translateY(-20px);
}

.fsn-notification.fsn-show {
    opacity: 1;
    transform: translateY(0);
}

.fsn-notification:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Image / thumbnail */
.fsn-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f3f4f6 center/cover no-repeat;
    overflow: hidden;
    position: relative;
}

.fsn-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--fsn-accent, #16a34a) 0%, #0f7c38 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

/* Text */
.fsn-body {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.fsn-title {
    font-size: 12.5px;
    color: #1f2937;
    font-weight: 400;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fsn-title strong {
    font-weight: 700;
    color: #111827;
}

.fsn-meta {
    font-size: 10.5px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.fsn-verified {
    color: var(--fsn-accent, #16a34a);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.fsn-verified svg {
    width: 11px;
    height: 11px;
}

.fsn-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    display: inline-block;
}

/* Close button */
.fsn-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .2s, color .2s;
}

.fsn-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #111827;
}

/* ============================================================
   MOBILE — compact, side-aligned, lifted above WoodMart nav
   ============================================================ */
@media (max-width: 768px) {

    #fsn-container {
        max-width: 290px;
        width: calc(100% - 24px);
    }

    /* Bottom-right (default) — sits above WoodMart sticky mobile nav,
       does NOT cover WhatsApp icon on bottom-left */
    #fsn-container.fsn-bottom-right {
        bottom: var(--fsn-mobile-offset, 75px);
        right: 12px;
        left: auto;
        max-width: 290px;
    }

    /* Bottom-left — same lift, but WhatsApp will overlap so we push higher */
    #fsn-container.fsn-bottom-left {
        bottom: calc(var(--fsn-mobile-offset, 75px) + 60px);
        left: 12px;
        right: auto;
        max-width: 290px;
    }

    /* Bottom-center — keep narrow */
    #fsn-container.fsn-bottom-center {
        bottom: var(--fsn-mobile-offset, 75px);
        left: 50%;
        transform: translateX(-50%);
        max-width: 290px;
        width: calc(100% - 24px);
    }

    /* Top positions — clear of "free delivery" banner */
    #fsn-container.fsn-top-right {
        top: var(--fsn-mobile-top-offset, 60px);
        right: 12px;
        max-width: 290px;
    }
    #fsn-container.fsn-top-left {
        top: var(--fsn-mobile-top-offset, 60px);
        left: 12px;
        max-width: 290px;
    }

    .fsn-notification {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .fsn-image {
        width: 42px;
        height: 42px;
    }

    .fsn-title { font-size: 11.5px; -webkit-line-clamp: 2; }
    .fsn-meta  { font-size: 10px; }
}

/* Very small phones */
@media (max-width: 380px) {
    #fsn-container {
        max-width: 260px;
    }
    .fsn-title { font-size: 11px; }
}
