/* ==========================================================================
   ACESPEED RECOVERY — LIVE RESTITUTION SIMULATION & TICKER WIDGET
   ========================================================================= */

/* Floating Live Recovery Notification (Bottom-Left) */
.live-restitution-popup {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9990;
  max-width: 370px;
  width: calc(100vw - 48px);
  background: rgba(8, 16, 32, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-left: 4px solid #10B981;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(16, 185, 129, 0.18);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  opacity: 0;
  transform: translateY(25px) scale(0.96);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.live-restitution-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.restitution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.restitution-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #34D399;
}

.restitution-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: restitutionPulse 1.8s infinite;
}

@keyframes restitutionPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.restitution-dismiss-btn {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.restitution-dismiss-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.restitution-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.restitution-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.restitution-amount {
  font-family: var(--font-heading, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: #10B981;
  letter-spacing: -0.01em;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.restitution-action-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
}

.restitution-detail {
  font-size: 0.78rem;
  color: #E2E8F0;
  line-height: 1.35;
}

.restitution-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.7rem;
  color: #64748B;
}

.restitution-docket-link {
  font-family: var(--font-mono, monospace);
  color: #38BDF8;
  text-decoration: none;
  font-weight: 600;
}

.restitution-docket-link:hover {
  text-decoration: underline;
}

/* In-Page Live Restitution Ticker Banner */
.restitution-ticker-container {
  background: rgba(10, 18, 36, 0.85);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding: 18px 0;
  margin: 3rem 0;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
}

.restitution-ticker-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.restitution-ticker-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 6px 14px;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.8rem;
  font-weight: 700;
  color: #34D399;
  white-space: nowrap;
  flex-shrink: 0;
}

.restitution-ticker-track {
  display: flex;
  gap: 2.5rem;
  animation: tickerSlide 45s linear infinite;
  white-space: nowrap;
}

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

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #CBD5E1;
}

.ticker-amount {
  font-weight: 700;
  color: #10B981;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64748B;
}

.ticker-docket {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: #38BDF8;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .live-restitution-popup {
    bottom: 84px;
    left: 16px;
    width: calc(100vw - 32px);
  }
}
