/* =========================================================================
   AGAPE LIGHT NETWORK — TIER-1 GLOBAL MASTERPIECE ARCHITECTURE OVERLAY
   Standards: Neuroscience-Backed Cinematic UI, Dynamic Color Grading,
              Hardware-Accelerated WebGL/Canvas Atmosphere & 1-Click Biometrics
   ========================================================================= */

:root {
  /* Dynamic Neuro-Aesthetic Ambient Lighting Tokens */
  --ambient-light-x: 50%;
  --ambient-light-y: 20%;
  --glow-trust-blue: rgba(20, 40, 63, 0.12);
  --glow-action-gold: rgba(215, 179, 106, 0.22);
  --glow-rescue-crimson: rgba(158, 42, 43, 0.20);
  --glass-border: rgba(229, 224, 213, 0.6);
  --glass-surface: rgba(255, 255, 255, 0.88);
}

/* 1. Global Cinematic Ambient Layer (Disabled fixed repaint to guarantee zero scroll blink) */
body::before {
  display: none !important;
}

/* 2. High-Trust Surface Styling */
.cinematic-glass {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px -10px rgba(15, 30, 48, 0.12), 0 2px 8px -2px rgba(15, 30, 48, 0.04);
}

/* 3. Focus Tiers — Rock-Solid Anti-Jitter Styling */
.strategic-rescue-tier,
.card[data-tier="500"],
.card[data-tier="1000"] {
  position: relative;
  box-shadow: 0 12px 32px -4px rgba(20, 40, 63, 0.1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

/* 4. Legacy Canvas Hidden */
#cinematicAtmosphereCanvas {
  display: none !important;
}

/* 5. 1-Click Biometric & Instant Fast Checkout Modal */
.biometric-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 37, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.biometric-modal-overlay.active,
.biometric-modal-overlay.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.biometric-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 30px 60px -15px rgba(11, 19, 37, 0.3), 0 0 35px rgba(215, 179, 106, 0.15);
  border: 1px solid rgba(215, 179, 106, 0.4);
  transform: translateY(20px) scale(0.97);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.biometric-modal-overlay.active .biometric-card,
.biometric-modal-overlay.is-open .biometric-card {
  transform: translateY(0) scale(1) !important;
}

/* Preset selector buttons */
.preset-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.preset-btn {
  background: #FAF8F3;
  border: 2px solid #E5E0D5;
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
}

.preset-btn.active {
  background: #FFFFFF;
  border-color: var(--color-teal);
  box-shadow: 0 4px 14px rgba(23, 107, 87, 0.18);
}

.preset-btn-amount {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.1;
}

.preset-btn.active .preset-btn-amount {
  color: var(--color-teal);
}

.preset-btn-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Native Apple Pay / Google Pay Biometric Trigger */
.btn-biometric-native {
  width: 100%;
  background: #000000;
  color: #FFFFFF !important;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background-color 0.15s ease;
  min-height: 50px;
  touch-action: manipulation;
}

.btn-biometric-native:hover {
  background: #1A1A1A;
  transform: translateY(-1px);
}

.btn-biometric-native:active {
  transform: scale(0.98);
}

/* Instant Crypto Terminal Box */
.crypto-terminal-box {
  background: #0B1325;
  border: 1px solid #1E293B;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #FFFFFF;
  margin-top: 1.25rem;
}

.crypto-asset-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.785rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crypto-asset-pill.active {
  background: var(--color-gold);
  color: #0B1325;
  border-color: var(--color-gold);
  font-weight: 700;
}

.crypto-address-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(215, 179, 106, 0.4);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--color-gold);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.btn-copy-address {
  background: rgba(215, 179, 106, 0.2);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-copy-address:hover {
  background: var(--color-gold);
  color: #0B1325;
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  body::before {
    display: none;
  }
  #cinematicAtmosphereCanvas {
    display: none;
  }
  .strategic-rescue-tier::before,
  [data-tier="500"]::before,
  [data-tier="1000"]::before {
    animation: none;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
  .biometric-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .biometric-card {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 2rem 1.25rem 2.5rem;
    max-height: 88vh;
  }
}

