/* ============================================================
   components.css — REDitors UI Components
   VidIQ-Inspired: Clean Dark Nav, Flat Modals, Minimal Depth
   ============================================================ */

/* ─── FILM GRAIN (very subtle, optional) ─────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .015;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
  animation: grain .3s steps(3) infinite;
  will-change: transform;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2px, 1px); }
  66%  { transform: translate(1px, -2px); }
  100% { transform: translate(0, 0); }
}

/* ─── CUSTOM CURSOR ───────────────────────────────────────────── */
.cursor-dot, .cursor-outline {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.cursor-outline {
  width: 24px; height: 24px;
  border: 1px solid rgba(59,130,246,.4);
  opacity: .7;
  transform: translate(-50%, -50%);
  transition: transform .08s var(--ease-out), opacity .15s;
}
@media (hover: none) and (pointer: coarse) {
  .cursor-dot, .cursor-outline { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — VidIQ style: clean, dark, single border
   ═══════════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(6,6,6,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle, #141414);
  transition: background var(--transition-base);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 64px);
  max-width: 1440px;
  margin: 0 auto;
  height: 52px;          /* VidIQ nav is compact */
}

/* Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 1.15rem;
  font-weight: var(--font-black);
  letter-spacing: -.5px;
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.logo:hover { color: var(--accent); }

.version {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--text-muted);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.version:hover { border-color: var(--border-hover); color: var(--text-dim); }

/* Center nav links */
.nav-center {
  display: flex;
  gap: 0;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: var(--font-medium);
  padding: 0 14px;
  height: 52px;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  border-bottom: 2px solid transparent;
  top: 1px; /* align border with nav bottom */
}
.nav-link:hover { color: var(--text-secondary); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent); font-weight: var(--font-semibold); }

/* Right side */
.nav-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Nav buttons */
.nav-btn-primary,
.nav-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-base);
  font-weight: var(--font-semibold);
  font-size: .8rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
}

.nav-btn-primary {
  background: var(--accent);
  color: #fff;
}
.nav-btn-primary:hover { background: var(--accent-hover); }

.nav-btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.nav-btn-secondary:hover { background: var(--bg-elevated); border-color: var(--border-hover); color: var(--text-secondary); }

/* Icon button (bell, search, theme) */
.nav-icon-btn {
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.nav-icon-btn:hover { 
  border-color: rgba(255, 255, 255, 0.6); 
  background: #ffffff; 
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.nav-icon-btn i { width: 16px; height: 16px; stroke-width: 2.5px; }

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--error);
  color: #fff;
  font-size: .5rem;
  font-weight: var(--font-black);
  padding: 1px 4px;
  border-radius: var(--radius-full);
  min-width: 14px;
  text-align: center;
  line-height: 1.4;
  border: 1.5px solid var(--bg);
}

/* Language switch */
.lang-switch {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-base);
  cursor: pointer;
  font-size: .8rem;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.lang-switch:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.lang-switch option { background: var(--bg-card); }

/* Theme toggle */
.theme-toggle {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  color: var(--text-dim);
  transition: all var(--transition-fast);
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--border-hover); background: var(--bg-elevated); }

/* User avatar in nav */
.user-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-base);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: .65rem;
  font-weight: var(--font-black);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ─── MOBILE MENU TOGGLE ──────────────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 26px; height: 26px;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 1px;
  transition: all .22s var(--ease);
}
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  top: 52px; right: 0;
  width: min(300px, 88vw);
  height: calc(100vh - 52px);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  z-index: 999;
  transform: translateX(100%);
  transition: transform .25s var(--ease);
  overflow-y: auto;
  padding: 16px 12px 32px;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 998;
  display: none;
}
.mobile-menu-overlay.active { display: block; }

.mob-nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: var(--font-medium);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
}
.mob-nav-link:hover { background: rgba(255,255,255,.03); color: var(--text-dim); }
.mob-nav-link.active { background: var(--accent-subtle); color: var(--text); border-left-color: var(--accent); font-weight: var(--font-semibold); }

/* SEARCH MODAL (Styles moved to overhaul_new.css) */
.kbd {
  padding: 2px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATIONS PANEL — landing page version
   ═══════════════════════════════════════════════════════════════ */

.notifications-panel {
  position: fixed;
  top: 58px;
  right: max(16px, calc((100vw - 1440px) / 2 + 16px));
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s var(--ease-out);
  pointer-events: none;
}
.notifications-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.notifications-header h3 { font-size: .85rem; font-weight: var(--font-semibold); color: var(--text-secondary); }
.mark-all-read {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: .72rem;
  cursor: pointer;
  font-weight: var(--font-medium);
  font-family: inherit;
  transition: color var(--transition-fast);
}
.mark-all-read:hover { color: var(--accent-hover); }

.notifications-list { max-height: 380px; overflow-y: auto; }
.notifications-list::-webkit-scrollbar { width: 3px; }
.notifications-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.notification-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg-elevated); }
.notification-item.unread { background: var(--accent-subtle); border-left: 2px solid var(--accent); padding-left: 14px; }
.notification-icon { font-size: 1.1rem; padding-top: 1px; flex-shrink: 0; }
.notification-content h4 { font-size: .8rem; font-weight: var(--font-semibold); color: var(--text-secondary); margin-bottom: 3px; }
.notification-content p { font-size: .74rem; color: var(--text-dim); line-height: 1.45; margin-bottom: 4px; }
.notification-time { font-size: .65rem; color: var(--text-muted); }

.notifications-footer {
  padding: 10px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.notifications-footer a { color: var(--text-muted); font-size: .75rem; transition: color var(--transition-fast); text-decoration: none; }
.notifications-footer a:hover { color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════
   GENERAL BUTTONS — Site-wide
   ═══════════════════════════════════════════════════════════════ */

.special-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-base);
  font-weight: var(--font-semibold);
  font-size: .9rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
.special-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,.25); }
.special-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   FEATURE TABS (Landing page)
   ═══════════════════════════════════════════════════════════════ */

.feature-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  font-size: .82rem;
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.feature-tab:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.feature-tab.active { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--text); }
.feature-tab i { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: border-color var(--transition-fast);
}
.testimonial-card:hover { border-color: var(--border-hover); }

/* ═══════════════════════════════════════════════════════════════
   PRICING CARDS
   ═══════════════════════════════════════════════════════════════ */

.pricing-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  transition: all var(--transition-base);
  position: relative;
  text-align: center;
}
.pricing-mini-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pricing-mini-card.featured { border-color: var(--accent-border); background: var(--accent-subtle); }

.featured-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   FAQ (Accordion)
   ═══════════════════════════════════════════════════════════════ */

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: .9rem;
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  gap: 12px;
}
.faq-question:hover { color: var(--text); }
.faq-icon { flex-shrink: 0; color: var(--text-muted); transition: transform .2s var(--ease); }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease-out), padding .3s; }
.faq-item.active .faq-answer { max-height: 400px; padding-bottom: 18px; }
.faq-answer p { color: var(--text-dim); font-size: .84rem; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════
   TOOLBOX (tools page)
   ═══════════════════════════════════════════════════════════════ */

.toolbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: border-color var(--transition-fast);
}
.tool-card:hover { border-color: var(--border-hover); }

/* ═══════════════════════════════════════════════════════════════
   COMPARISON SLIDER
   ═══════════════════════════════════════════════════════════════ */

.comparison-container { position: relative; overflow: hidden; border-radius: var(--radius-xl); }
.comparison-label {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  background: rgba(6,6,6,.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: .62rem;
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  pointer-events: none;
}
.slider-handle {
  width: 36px; height: 36px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-base);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SCREEN — site-wide
   ═══════════════════════════════════════════════════════════════ */

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.loading-logo {
  font-size: 1.8rem;
  font-weight: var(--font-black);
  letter-spacing: -.5px;
  color: var(--text);
}
.loading-bar-track {
  width: 120px; height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  animation: loadBar 1.6s var(--ease-out) forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — component overrides
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
  .nav-center { display: none; }
  .mobile-menu-toggle { display: flex; }
  .lang-switch { display: none; }
}

@media (max-width: 767px) {
  .nav-container { height: 48px; }
  .logo { font-size: .95rem; }
  .version { display: none; }
  .nav-icon-btn, .theme-toggle { width: 28px; height: 28px; }
  .nav-btn-primary, .nav-btn-secondary { font-size: .76rem; padding: 5px 11px; }
  .mobile-menu { top: 48px; height: calc(100vh - 48px); }
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */

.nav-link:focus-visible,
.nav-btn-primary:focus-visible,
.nav-btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════ */

@media print {
  .noise, .cursor-dot, .cursor-outline, .nav, .mobile-menu { display: none !important; }
}
