/* ============================================================
   SmartAF Premium Effects
   Shared visual upgrade layer for all app pages.
   Carries the landing page design language into the tool UI.
   ============================================================ */

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00738c, #ad3091);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(0, 115, 140, 0.5), 0 0 16px rgba(0, 115, 140, 0.3);
  pointer-events: none;
}

/* --- Button Shimmer Sweep --- */
.btn-gradient,
a[style*="linear-gradient(135deg, #00738c"] {
  position: relative;
  overflow: hidden;
}
.btn-gradient::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: shimmerSweep 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmerSweep {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}
.btn-gradient:hover::after {
  animation-duration: 1.5s;
}

/* Shimmer for inline-styled gradient buttons (hero CTA, chat send, etc.) */
.shimmer-btn {
  position: relative;
  overflow: hidden;
}
.shimmer-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: shimmerSweep 4s ease-in-out infinite;
  pointer-events: none;
}
.shimmer-btn:hover::after {
  animation-duration: 1.5s;
}

/* --- Card Spotlight (cursor-following glow) --- */
.spotlight-card {
  position: relative;
  overflow: hidden;
}
.spotlight-card .spotlight-mask {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
.spotlight-card:hover .spotlight-mask {
  opacity: 1;
}

/* --- Elevated Card Hovers --- */
.premium-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 115, 140, 0.25);
}
.dark .premium-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 142, 168, 0.25);
}

/* --- Gradient Accent Top Lines on Cards --- */
.accent-top {
  position: relative;
}
.accent-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00738c, #ad3091);
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.accent-top:hover::before {
  opacity: 1;
}

/* Always-visible accent for hero/section cards */
.accent-top-always::before {
  opacity: 1;
}

/* --- Glow Effects --- */
.glow-text {
  text-shadow: 0 0 20px rgba(0, 115, 140, 0.4), 0 0 40px rgba(0, 115, 140, 0.15);
}
.dark .glow-text {
  text-shadow: 0 0 20px rgba(0, 163, 196, 0.5), 0 0 40px rgba(0, 163, 196, 0.2);
}

/* Glow on stat numbers */
.stat-glow {
  transition: text-shadow 0.3s ease;
}
.stat-card:hover .stat-glow {
  text-shadow: 0 0 16px rgba(0, 115, 140, 0.35);
}
.dark .stat-card:hover .stat-glow {
  text-shadow: 0 0 16px rgba(0, 163, 196, 0.45);
}

/* Chat button glow pulse */
.chat-btn-glow {
  animation: chatGlow 3s ease-in-out infinite;
}
@keyframes chatGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 115, 140, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(0, 115, 140, 0.6), 0 0 60px rgba(0, 115, 140, 0.2); }
}

/* --- Glassmorphism --- */
.glass-sidebar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Glass effect for mobile top bar */
.glass-topbar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* --- Sidebar Active State Glow --- */
.nav-link.active {
  position: relative;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #00738c, #ad3091);
  border-radius: 0 3px 3px 0;
}

/* --- Section Label Accent (matching landing page) --- */
.section-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-heading::before {
  content: "";
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #00738c, #ad3091);
  border-radius: 2px;
  flex-shrink: 0;
}

/* --- Storage Bar Glow --- */
.storage-bar-glow {
  box-shadow: 0 0 8px rgba(0, 115, 140, 0.3);
}

/* --- Folder Card Color Glow on Hover --- */
.folder-card:hover .folder-icon {
  filter: drop-shadow(0 0 8px currentColor);
  transition: filter 0.3s ease;
}

/* --- Doc Row Gradient Left Border on Hover --- */
.doc-row-premium {
  position: relative;
  transition: background-color 0.15s ease, padding-left 0.2s ease;
}
.doc-row-premium::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #00738c, #ad3091);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.doc-row-premium:hover::before {
  opacity: 1;
}

/* --- Support Chat Float Button --- */
/* Note: no position:relative here, it would override Tailwind's fixed positioning */

/* --- Package Card Type Badge Glow --- */
.badge-iq-boost {
  box-shadow: 0 0 8px rgba(0, 115, 140, 0.2);
}
.badge-power-pack {
  box-shadow: 0 0 8px rgba(173, 48, 145, 0.2);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .btn-gradient::after,
  .shimmer-btn::after,
  .chat-float-btn::after { animation: none; display: none; }
  .chat-btn-glow { animation: none; }
  .premium-card:hover { transform: none; }
  .spotlight-card .spotlight-mask { display: none; }
}

/* ---- Sidebar shared styles (extracted from inline <style> blocks) ---- */
.nav-link { transition: all 0.15s ease; }
.nav-link:hover { background: rgba(0, 115, 140, 0.06); }
.dark .nav-link:hover { background: rgba(0, 142, 168, 0.1); }
.nav-link.active { background: rgba(0, 115, 140, 0.08); color: #00738c; }
.dark .nav-link.active { background: rgba(0, 142, 168, 0.12); color: #008ea8; }
.sidebar-overlay { background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); }

.theme-toggle { position: relative; width: 40px; height: 22px; border-radius: 11px; cursor: pointer; transition: background-color 0.2s ease; }
.theme-toggle .toggle-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform 0.2s ease; display: flex; align-items: center; justify-content: center; }
.theme-toggle.on .toggle-dot { transform: translateX(18px); }
