/* ── ED Sales Popup ─────────────────────────────────────────────────────── */
#ed-sp-popup {
    position: fixed;
    z-index: 99999;
    max-width: 320px;
    width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: auto;
    /* Position set by JS via data attribute */
    transition: opacity 0.35s ease, transform 0.35s ease;
    opacity: 0;
    transform: translateY(12px);
}

/* Positions */
#ed-sp-popup.pos-bottom-left  { bottom: 24px; left: 16px; }
#ed-sp-popup.pos-bottom-right { bottom: 24px; right: 16px; }
#ed-sp-popup.pos-top-left     { top: 80px; left: 16px; }
#ed-sp-popup.pos-top-right    { top: 80px; right: 16px; }

/* Visible state */
#ed-sp-popup.ed-sp-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Inner layout */
.ed-sp-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px 14px 14px;
    position: relative;
}

/* Thumbnail */
.ed-sp-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ed-sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ed-sp-thumb-icon {
    font-size: 24px;
    line-height: 1;
}

/* Text area */
.ed-sp-body { flex: 1; min-width: 0; }
.ed-sp-message {
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ed-sp-product {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.ed-sp-product:hover { text-decoration: underline; }
.ed-sp-meta {
    margin: 4px 0 0;
    font-size: 11px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ed-sp-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}
.ed-sp-verified::before {
    content: "✓";
    font-weight: 700;
}

/* Accent stripe */
.ed-sp-stripe {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
}

/* Close button */
.ed-sp-close {
    position: absolute;
    top: 8px; right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.35;
    padding: 2px 4px;
    color: inherit;
    transition: opacity 0.15s;
}
.ed-sp-close:hover { opacity: 0.7; }

/* Progress bar */
.ed-sp-progress {
    height: 3px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
}
.ed-sp-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
    transition: none;
}

/* Mobile */
@media (max-width: 400px) {
    #ed-sp-popup { max-width: calc(100vw - 24px); }
    #ed-sp-popup.pos-bottom-left,
    #ed-sp-popup.pos-bottom-right { bottom: 16px; left: 12px; right: 12px; max-width: none; }
    #ed-sp-popup.pos-top-left,
    #ed-sp-popup.pos-top-right    { top: 70px; left: 12px; right: 12px; max-width: none; }
}
