/* ==========================================================
   Void Messenger — Neon Tube Button
   Reklameschild-Stil: transparenter Hintergrund, Neon-Glow
   Border, Text-Shadow mit 4-Layer-Glow, Flicker-Animation.
   ========================================================== */

/* === Base Neon Tube === */
.neon-tube {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 16px 42px;
  background: transparent;
  border: 1.5px solid var(--neon-magenta);
  border-radius: var(--radius-button);
  color: var(--neon-magenta);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  position: relative;

  /* 4-Layer Neon Text Glow */
  text-shadow:
    0 0 7px rgba(255, 45, 120, 0.5),
    0 0 20px rgba(255, 45, 120, 0.3),
    0 0 40px rgba(255, 45, 120, 0.15),
    0 0 2px rgba(255, 255, 255, 0.8);

  /* 3-Layer Box Glow */
  box-shadow:
    inset 0 0 15px rgba(255, 45, 120, 0.08),
    0 0 15px rgba(255, 45, 120, 0.25),
    0 0 50px rgba(255, 45, 120, 0.1);

  transition: transform 150ms ease, box-shadow 300ms ease;
  animation: neon-flicker 6s ease-in-out infinite;
}

.neon-tube:hover {
  transform: translateY(-2px) scale(1.02);
  animation: none;
  box-shadow:
    inset 0 0 20px rgba(255, 45, 120, 0.12),
    0 0 25px rgba(255, 45, 120, 0.4),
    0 0 80px rgba(255, 45, 120, 0.15);
}

.neon-tube:active {
  transform: translateY(0) scale(0.98);
}

/* Subtitel innerhalb des Buttons */
.neon-tube__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.6;
  text-shadow: none;
}

/* === Filled-Variante (1:1 iOS profileGradientButton) === */
/* 6-Layer Aufbau exakt wie SettingsScreen.swift Zeile 602-643:
   Layer 1: OLED-Schwarz Hintergrund
   Layer 2: Gradient-Glow (conic-gradient, blur 10px)
   Layer 3: Scharfe Gradient-Roehre (2.5px, mask-composite)
   Layer 4: Heisser Kern (white 0.2 inset)
   Layer 5: Label (Gradient-Text + Shadows)
   Layer 6: Aeussere Shadows (magenta r:6 + peach r:12) */
.neon-tube--filled {
  /* Kein Hintergrund — transparent wie Neon-Schild */
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-button-filled);
  letter-spacing: 0.12em;
  font-weight: 500;
  font-size: 1.2rem;
  height: 84px;
  padding: 0 48px;
  overflow: visible;
  isolation: isolate;
  text-shadow: none;
  color: var(--text-primary);

  /* Neon-Glow Shadows (kein inset) */
  box-shadow:
    0 0 10px rgba(255, 45, 120, 0.5),
    0 0 24px rgba(255, 154, 92, 0.3);

  transition: transform 150ms ease, box-shadow 300ms ease;
}

/* Glow hinter dem Button entfernt — kein Hintergrund */
.neon-tube--filled::before {
  content: none;
}

/* iOS Layer 3: .stroke(gradient, lineWidth: 2.5) — Scharfe Gradient-Roehre
   Technik: mask-composite erzeugt echten Gradient-Border */
.neon-tube--filled::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-button-filled);
  /* iOS: lineWidth 2.5 → padding 2.5px fuer Border-Dicke */
  padding: 2.5px;
  /* iOS: AngularGradient(colors: [.neonPeach, .neonMagenta, .neonPeach], center: .center) */
  background: conic-gradient(from 0deg, #FF9A5C, #FF2D78, #FF9A5C);
  z-index: -1;
  /* Mask-Composite: Zeigt nur den 2.5px Gradient-Border, Mitte transparent */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

/* iOS Layer 5: .foregroundStyle(gradient) + Shadows */
.neon-tube__label {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* iOS: .shadow(color: .neonMagenta.opacity(0.5), radius: 6)
          .shadow(color: .neonPeach.opacity(0.3), radius: 12) */
  filter: drop-shadow(0 0 6px rgba(255, 45, 120, 0.5))
          drop-shadow(0 0 12px rgba(255, 154, 92, 0.3));
}

.neon-tube--filled .neon-tube__sub {
  color: var(--text-secondary);
  opacity: 0.6;
}

.neon-tube--filled:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 20px rgba(255, 45, 120, 0.6),
    0 0 40px rgba(255, 154, 92, 0.35);
}

/* ::before entfernt — kein Hover noetig */

.neon-tube--filled:active {
  transform: translateY(0) scale(0.98);
}

/* === Farb-Variante: Peach === */
.neon-tube--peach {
  border-color: var(--neon-peach);
  color: var(--neon-peach);
  text-shadow:
    0 0 7px rgba(255, 154, 92, 0.5),
    0 0 20px rgba(255, 154, 92, 0.3),
    0 0 40px rgba(255, 154, 92, 0.15),
    0 0 2px rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 0 15px rgba(255, 154, 92, 0.08),
    0 0 15px rgba(255, 154, 92, 0.25),
    0 0 50px rgba(255, 154, 92, 0.1);
}

.neon-tube--peach:hover {
  box-shadow:
    inset 0 0 20px rgba(255, 154, 92, 0.12),
    0 0 25px rgba(255, 154, 92, 0.4),
    0 0 80px rgba(255, 154, 92, 0.15);
}

/* === Farb-Variante: Amber === */
.neon-tube--amber {
  border-color: var(--neon-amber);
  color: var(--neon-amber);
  text-shadow:
    0 0 7px rgba(255, 183, 77, 0.5),
    0 0 20px rgba(255, 183, 77, 0.3),
    0 0 40px rgba(255, 183, 77, 0.15),
    0 0 2px rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 0 15px rgba(255, 183, 77, 0.08),
    0 0 15px rgba(255, 183, 77, 0.25),
    0 0 50px rgba(255, 183, 77, 0.1);
}

/* === Mobile === */
@media (max-width: 768px) {
  .neon-tube {
    padding: 14px 34px;
    font-size: 0.95rem;
  }

  .neon-tube--filled {
    height: 76px;
    padding: 0 36px;
    font-size: 1.1rem;
  }
}
