/* ============================================================
   WC Live Sales Notification – Frontend Styles
   ============================================================ */

#wclsn-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  padding: 16px;
}

/* Positions */
#wclsn-container.wclsn-pos-bottom-left  { bottom: 0; left: 0; }
#wclsn-container.wclsn-pos-bottom-right { bottom: 0; right: 0; }
#wclsn-container.wclsn-pos-top-left     { top: 0; left: 0; }
#wclsn-container.wclsn-pos-top-right    { top: 0; right: 0; }

/* ── Base Popup ── */
.wclsn-popup {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 300px;
  max-width: calc(100vw - 32px);
  position: relative;
  cursor: default;

  /* Animation */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wclsn-popup.wclsn-popup--visible {
  opacity: 1;
  transform: translateY(0);
}

.wclsn-popup.wclsn-popup--hiding {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Product Image ── */
.wclsn-popup__image {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

.wclsn-popup__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Body ── */
.wclsn-popup__body {
  flex: 1;
  min-width: 0;
}

.wclsn-popup__text {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.wclsn-popup__product {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wclsn-popup__time {
  margin: 0;
  font-size: 11px;
  opacity: 0.65;
}

/* ── Close Button ── */
.wclsn-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(0,0,0,0.12);
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.wclsn-popup:hover .wclsn-popup__close {
  opacity: 1;
}

.wclsn-popup__close:hover {
  background: rgba(0,0,0,0.25);
}

/* ── Progress Bar ── */
.wclsn-popup__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.wclsn-popup__progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform linear;
}


/* ============================================================
   STYLE: MODERN (default)
   ============================================================ */
.wclsn-popup--modern {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 36px 14px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.wclsn-popup--modern .wclsn-popup__text   { color: #444; }
.wclsn-popup--modern .wclsn-popup__product { color: #111; }
.wclsn-popup--modern .wclsn-popup__progress-bar { background: linear-gradient(90deg, #6c63ff, #a78bfa); }
.wclsn-popup--modern .wclsn-popup__image { border-radius: 10px; }


/* ============================================================
   STYLE: MINIMAL
   ============================================================ */
.wclsn-popup--minimal {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 12px 36px 12px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.wclsn-popup--minimal .wclsn-popup__text    { color: #ccc; }
.wclsn-popup--minimal .wclsn-popup__product { color: #fff; }
.wclsn-popup--minimal .wclsn-popup__time    { color: #888; }
.wclsn-popup--minimal .wclsn-popup__close   { background: rgba(255,255,255,0.15); color: #fff; }
.wclsn-popup--minimal .wclsn-popup__close:hover { background: rgba(255,255,255,0.3); }
.wclsn-popup--minimal .wclsn-popup__image   { border-radius: 4px; }
.wclsn-popup--minimal .wclsn-popup__progress-bar { background: #fff; }


/* ============================================================
   STYLE: BOLD
   ============================================================ */
.wclsn-popup--bold {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border-radius: 16px;
  padding: 16px 40px 16px 14px;
  box-shadow: 0 12px 40px rgba(238, 90, 36, 0.4);
}

.wclsn-popup--bold .wclsn-popup__text    { color: rgba(255,255,255,0.9); }
.wclsn-popup--bold .wclsn-popup__product { color: #fff; }
.wclsn-popup--bold .wclsn-popup__time    { color: rgba(255,255,255,0.7); }
.wclsn-popup--bold .wclsn-popup__close   { background: rgba(255,255,255,0.2); color: #fff; }
.wclsn-popup--bold .wclsn-popup__close:hover { background: rgba(255,255,255,0.35); }
.wclsn-popup--bold .wclsn-popup__image   { border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.wclsn-popup--bold .wclsn-popup__progress-bar { background: rgba(255,255,255,0.5); }


/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 480px) {
  #wclsn-container {
    padding: 10px;
  }
  .wclsn-popup {
    width: calc(100vw - 20px);
  }
}

.wclsn-hide-mobile #wclsn-container {
  display: none !important;
}

@media (max-width: 767px) {
  body.wclsn-mobile-hide #wclsn-container {
    display: none !important;
  }
}
