/*!
 * Chapter 34 — Appearance & Optional Theme Effects Management System (Revised)
 * --------------------------------------------------------------------------
 * OPTIONAL, admin-only, OFF-by-default enhancement layer. The existing Azee
 * ViralHub theme (Dark Mode, Light Mode, Homepage, Hero Section, responsive
 * design) is the PRIMARY and PERMANENT theme and is NEVER overridden here.
 *
 * Every rule in this file is scoped under an `.az-appearance-*` class that
 * assets/js/appearance-effects.js only adds to <body> when a Super Admin has
 * explicitly enabled it from Appearance & Effects in the admin dashboard. If
 * this file fails to load, or the module/API is disabled or unreachable,
 * nothing changes — the permanent theme renders exactly as before (34.11).
 *
 * No selector in this file ever changes layout, position, size, spacing, or
 * overflow behaviour — only color, shadow, gradient and transform/opacity
 * animation on hover/focus, per 34.5/34.6/34.10 ("no layout changes", "no
 * overflow issues", "Hero Section layout must never change").
 */

/* ------------------------------------------------------------------ *
 * Theme Accent Colors (34.7) — optional, reversible. Only takes effect
 * when .az-appearance-accent is present; falls back to the theme's own
 * existing variables otherwise, so nothing changes by default.
 * ------------------------------------------------------------------ */
.az-appearance-accent {
  --az-accent-primary: var(--az-appearance-accent-primary, inherit);
  --az-accent-secondary: var(--az-appearance-accent-secondary, inherit);
}

.az-appearance-accent .az-appearance-accent-target {
  color: var(--az-appearance-accent-primary, inherit);
}

/* ------------------------------------------------------------------ *
 * Hero Section Effects (34.5) — optional. Layout untouched; only the
 * headline's own background/text/box-shadow properties are affected.
 * ------------------------------------------------------------------ */
.az-appearance-hero-gradient-text .az-appearance-hero-headline {
  background: linear-gradient(90deg, var(--az-appearance-accent-primary, #ffd700), #fff7ae, #ffffff, var(--az-appearance-accent-primary, #ffd700));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: az-appearance-gradient-flow 6s ease-in-out infinite;
}

.az-appearance-hero-glow .az-appearance-hero-headline {
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.35), 0 0 36px rgba(255, 215, 0, 0.18);
}

.az-appearance-hero-soft-animations .az-appearance-hero-headline {
  animation: az-appearance-soft-fade-up 900ms ease-out both;
}

@keyframes az-appearance-gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes az-appearance-soft-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ *
 * Button Effects (34.6) — optional visual enhancements only. No change
 * to button size, padding, position, or text.
 * ------------------------------------------------------------------ */
.az-appearance-button-lift .az-appearance-btn {
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.az-appearance-button-lift .az-appearance-btn:hover,
.az-appearance-button-lift .az-appearance-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.az-appearance-button-glow .az-appearance-btn {
  transition: box-shadow 180ms ease;
}
.az-appearance-button-glow .az-appearance-btn:hover,
.az-appearance-button-glow .az-appearance-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 215, 0, 0.35);
}

.az-appearance-button-gradient .az-appearance-btn {
  background-image: linear-gradient(90deg, var(--az-appearance-accent-primary, #ffd700), var(--az-appearance-accent-secondary, #ffb347));
  background-size: 160% auto;
  transition: background-position 300ms ease;
}
.az-appearance-button-gradient .az-appearance-btn:hover,
.az-appearance-button-gradient .az-appearance-btn:focus-visible {
  background-position: right center;
}

.az-appearance-button-ripple {
  position: relative;
  overflow: hidden;
}
.az-appearance-button-ripple .az-appearance-ripple-dot {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  animation: az-appearance-ripple 550ms ease-out forwards;
}

@keyframes az-appearance-ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* ------------------------------------------------------------------ *
 * Generic Theme Effects toggle (34.4) — a light surface-depth touch,
 * reversible and purely cosmetic (shadow/border only, no layout shift).
 * ------------------------------------------------------------------ */
.az-appearance-theme-on .az-appearance-surface {
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

/* ------------------------------------------------------------------ *
 * Accessibility (34.10 mobile/desktop protection, mirrors Chapter 33) —
 * every animation above is skipped for users who prefer reduced motion.
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .az-appearance-hero-gradient-text .az-appearance-hero-headline,
  .az-appearance-hero-soft-animations .az-appearance-hero-headline,
  .az-appearance-button-ripple .az-appearance-ripple-dot {
    animation: none !important;
  }
  .az-appearance-button-lift .az-appearance-btn:hover,
  .az-appearance-button-lift .az-appearance-btn:focus-visible {
    transform: none;
  }
}
