/* ==========================================================================
   Live transaction popup — Growth Hill Capital
   Slide-in "An Investor from <country> deposited $x,xxx.xx" notification.
   Themes itself with the public-theme CSS variables (falls back to the
   dark palette when those variables are unavailable).
   ========================================================================== */

.gh-txp {
  position: fixed;
  z-index: 999999;
  width: 400px;
  max-width: calc(100vw - 28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  font-family: "Poppins", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- positions ---------- */
.gh-txp--top-center {
  top: 18px;
  left: 50%;
  transform: translate(-50%, -18px);
}

.gh-txp--bottom-left {
  left: 18px;
  bottom: 18px;
  transform: translateY(18px);
}

.gh-txp--bottom-right {
  right: 18px;
  bottom: 18px;
  transform: translateY(18px);
}

.gh-txp--show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gh-txp--top-center.gh-txp--show {
  transform: translate(-50%, 0);
}

.gh-txp--bottom-left.gh-txp--show,
.gh-txp--bottom-right.gh-txp--show {
  transform: translateY(0);
}

/* ---------- card ---------- */
.gh-txp__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px 13px 14px;
  background: rgba(21, 24, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  color: #ffffff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gh-txp__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2bd06f, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.45);
}

.gh-txp__icon svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* withdrawal variant uses the brand gold */
.gh-txp[data-kind="out"] .gh-txp__icon {
  background: linear-gradient(135deg, #f1d675, #d4af37);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.45);
}

.gh-txp__info {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.gh-txp__text {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-txp__amount {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.gh-txp__close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.gh-txp__close svg {
  width: 13px;
  height: 13px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.gh-txp__close:hover,
.gh-txp__close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

/* ---------- progress bar ---------- */
.gh-txp__progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.gh-txp__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.gh-txp[data-kind="out"] .gh-txp__bar {
  background: linear-gradient(90deg, #d4af37, #f1d675);
}

/* ---------- light theme ---------- */
html[data-theme="light"] .gh-txp__card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(17, 18, 22, 0.12);
  color: #111216;
}

html[data-theme="light"] .gh-txp__text {
  color: rgba(17, 18, 22, 0.72);
}

html[data-theme="light"] .gh-txp__amount {
  color: #111216;
}

html[data-theme="light"] .gh-txp__close {
  color: rgba(17, 18, 22, 0.55);
}

html[data-theme="light"] .gh-txp__close:hover,
html[data-theme="light"] .gh-txp__close:focus-visible {
  color: #111216;
  background: rgba(17, 18, 22, 0.08);
}

html[data-theme="light"] .gh-txp__progress {
  background: rgba(17, 18, 22, 0.12);
}

/* ---------- small screens ---------- */
@media (max-width: 575px) {
  .gh-txp--top-center {
    top: 10px;
    width: calc(100vw - 20px);
  }

  .gh-txp--bottom-left,
  .gh-txp--bottom-right {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .gh-txp__card {
    padding: 11px 8px 11px 12px;
  }

  .gh-txp__amount {
    font-size: 17px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .gh-txp {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
}
