/* ==========================================================
   Tech Fix and Trade — Trust Activity System
   Floating notifications · Animated counters · Activity strip

   DESIGN TOKENS (match site):
     accent-green : #00ff9d
     accent-blue  : #2563eb
     dark-bg      : #1a1a1a / #111827
     card-dark    : #1e293b
     font         : Inter
   ========================================================== */

/* ----------------------------------------------------------
   1. FLOATING NOTIFICATION SYSTEM
   Position: bottom-left (call button lives bottom-right)
   ---------------------------------------------------------- */

#tft-notif-root {
  position: fixed;
  bottom: 88px;          /* above mobile floating call button + sticky CTA */
  left: 18px;
  z-index: 800;          /* below call button (1000) but above content */
  width: 310px;
  max-width: calc(100vw - 36px);
  pointer-events: none;  /* clicks pass through the wrapper */
}

@media (min-width: 640px) {
  #tft-notif-root {
    bottom: 28px;
    width: 326px;
  }
}

/* Hide completely on very small portrait screens */
@media (max-width: 374px) {
  #tft-notif-root { display: none; }
}

/* ---- Notification card ---- */
.tft-notif {
  pointer-events: all;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px 17px;   /* extra bottom for progress bar */
  background: #1e293b;
  border: 1px solid rgba(0, 255, 157, 0.18);
  border-radius: 18px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.12),
    0 8px 28px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  /* Entry state — hidden below */
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
  cursor: default;
  user-select: none;
}

.tft-notif.tft-notif--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tft-notif.tft-notif--hiding {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition:
    opacity 0.2s ease-in,
    transform 0.2s ease-in;
}

/* ---- Icon bubble ---- */
.tft-notif__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid rgba(0, 255, 157, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

/* ---- Text body ---- */
.tft-notif__body {
  flex: 1;
  min-width: 0;
  padding-right: 2px;
}

.tft-notif__text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.45;
  margin: 0 0 5px;
  /* Prevent single word overflow */
  overflow-wrap: break-word;
}

.tft-notif__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tft-notif__label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.01em;
}

.tft-notif__sep {
  font-size: 11px;
  color: #334155;
}

.tft-notif__time {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #00ff9d;
  letter-spacing: 0.01em;
}

/* ---- Close button ---- */
.tft-notif__close {
  flex-shrink: 0;
  align-self: flex-start;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  margin-top: 1px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tft-notif__close:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.18);
}

.tft-notif__close:focus-visible {
  outline: 2px solid #00ff9d;
  outline-offset: 2px;
}

/* ---- Progress bar (auto-dismiss timer) ---- */
.tft-notif__progress {
  position: absolute;
  bottom: 0;
  left: 6px;
  right: 6px;
  height: 2px;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.tft-notif__bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00ff9d 0%, #2563eb 100%);
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(1);
}

/* ---- Mobile adjustments ---- */
@media (max-width: 639px) {
  .tft-notif {
    padding: 11px 12px 15px;
    border-radius: 16px;
  }
  .tft-notif__icon {
    width: 36px;
    height: 36px;
    font-size: 17px;
    border-radius: 9px;
  }
  .tft-notif__text {
    font-size: 12.5px;
  }
}

/* ----------------------------------------------------------
   2. ANIMATED TRUST COUNTERS SECTION
   Used on homepage only — dark section, green accents
   ---------------------------------------------------------- */

.tft-stats-section {
  background: #111827;
  padding: 68px 20px;
}

.tft-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.tft-stats-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #00ff9d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-align: center;
}

.tft-stats-heading {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
  text-align: center;
}

.tft-stats-sub {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 auto 48px;
  max-width: 480px;
  text-align: center;
}

.tft-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
}

.tft-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 157, 0.12);
  border-radius: 18px;
  padding: 26px 12px;
  text-align: center;
  overflow: hidden;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.tft-stat-card:hover {
  border-color: rgba(0, 255, 157, 0.3);
  background: rgba(0, 255, 157, 0.04);
  transform: translateY(-3px);
}

.tft-stat-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
  line-height: 1;
}

.tft-stat-value {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  color: #00ff9d;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  display: block;
  white-space: nowrap;
  min-height: 1em;
}

.tft-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  display: block;
}

/* ----------------------------------------------------------
   3. LIVE ACTIVITY TICKER STRIP
   Scrolling service marquee — sits below counter section
   ---------------------------------------------------------- */

.tft-ticker-wrap {
  background: #0f172a;
  border-top: 1px solid rgba(0, 255, 157, 0.08);
  padding: 13px 0;
  position: relative;
  overflow: hidden;
}

/* Fade edges */
.tft-ticker-wrap::before,
.tft-ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 2;
  pointer-events: none;
}
.tft-ticker-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #0f172a 30%, transparent);
}
.tft-ticker-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, #0f172a 30%, transparent);
}

.tft-ticker-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: tft-ticker-scroll 48s linear infinite;
}

.tft-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tft-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tft-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.tft-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff9d;
  flex-shrink: 0;
  animation: tft-dot-pulse 2.2s ease-in-out infinite;
}

@keyframes tft-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ----------------------------------------------------------
   4. REDUCED MOTION OVERRIDES
   Respect system preference — disable all animations
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .tft-notif,
  .tft-notif.tft-notif--visible,
  .tft-notif.tft-notif--hiding {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .tft-notif__bar {
    transition: none;
  }

  .tft-ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding: 4px 16px;
  }

  .tft-ticker-wrap::before,
  .tft-ticker-wrap::after {
    display: none;
  }

  .tft-ticker-dot {
    animation: none;
  }

  .tft-stat-card {
    transition: none;
  }
}
