/* ─────────────────────────────────────────
   TRADING POPUP — trading-popup.css
   Link: <link rel="stylesheet" href="trading-popup.css">
───────────────────────────────────────── */

#trading-popup {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(-140%);
  z-index: 9999;
  width: min(270px, calc(100vw - 48px));
  transition: transform 0.45s cubic-bezier(0.34, 1.26, 0.64, 1);
  pointer-events: none;
}

#trading-popup.visible {
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.popup-card {
  background: #141920;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 3px solid #00d48b;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 212, 139, 0.08);
  position: relative;
  overflow: hidden;
}

.popup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 139, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── LEFT ICON ─── */
.popup-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(0, 212, 139, 0.12);
  border: 1px solid rgba(0, 212, 139, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-icon svg {
  width: 14px;
  height: 14px;
}

/* ─── TEXT ─── */
.popup-text {
  flex: 1;
  min-width: 0;
}

.popup-message {
  font-size: 11.5px;
  font-weight: 500;
  color: #e8eaf0;
  line-height: 1.35;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.popup-message .tp-name {
  color: #ffffff;
  font-weight: 700;
}

.popup-message .tp-amount {
  color: #00d48b;
  font-weight: 700;
}

.popup-message .tp-profit {
  color: #f6c344;
  font-weight: 700;
}

.popup-badge {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.popup-badge.badge-trading   { background: rgba(56, 139, 253, 0.18); color: #58a6ff; border: 1px solid rgba(56, 139, 253, 0.35); }
.popup-badge.badge-deposited { background: rgba(0, 212, 139, 0.15);  color: #00d48b; border: 1px solid rgba(0, 212, 139, 0.35); }
.popup-badge.badge-withdrew  { background: rgba(239, 68, 68, 0.15);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.30); }
.popup-badge.badge-profit    { background: rgba(246, 195, 68, 0.15); color: #f6c344; border: 1px solid rgba(246, 195, 68, 0.30); }

.popup-time {
  font-size: 10px;
  color: #5a6478;
  margin-top: 2px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ─── RIGHT SUCCESS SYMBOL ─── */
.popup-success {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: rgba(0, 212, 139, 0.13);
  border: 1px solid rgba(0, 212, 139, 0.30);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-success svg {
  width: 12px;
  height: 12px;
}

/* ─── PROGRESS BAR ─── */
.popup-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d48b, #00a36e);
  border-radius: 0 0 0 12px;
  transition: width linear;
  width: 100%;
}

/* ─── CLOSE BUTTON ─── */
.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: #3d4557;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.popup-close:hover {
  color: #8892a4;
  background: rgba(255, 255, 255, 0.06);
}

/* ─── QUEUE DOTS ─── */
#popup-queue {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(calc(-50% + 44px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 9998;
}

.queue-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 212, 139, 0.35);
  transition: background 0.3s, transform 0.3s;
}

.queue-dot.active {
  background: #00d48b;
  transform: scale(1.4);
}

/* ─── MOBILE: smaller footprint, safer positioning ─── */
@media (max-width: 480px) {
  #trading-popup {
    left: 12px;
    width: calc(100vw - 24px);
  }

  .popup-card {
    padding: 9px;
    gap: 8px;
    border-radius: 10px;
  }

  .popup-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .popup-icon svg {
    width: 14px;
    height: 14px;
  }

  .popup-message {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .popup-badge {
    font-size: 10px;
    padding: 2px 7px;
    margin-top: 4px;
  }

  .popup-time {
    font-size: 10px;
    margin-top: 2px;
  }

  .popup-success {
    width: 24px;
    height: 24px;
  }

  .popup-success svg {
    width: 12px;
    height: 12px;
  }

  .popup-close {
    width: 16px;
    height: 16px;
    top: 6px;
    right: 6px;
    font-size: 12px;
  }

  #popup-queue {
    left: 12px;
  }
}

