/* ── ToolKit Pro — Custom styles v2 ── */

/* ─── Upload zone ──────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #d1d5db;
  transition: border-color .2s, background .2s, transform .15s;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #4f46e5;
  background: #eef2ff;
  transform: scale(1.005);
}
.upload-zone.has-file {
  border-color: #10b981;
  background: #f0fdf4;
}

/* ─── Progress bar ─────────────────────────────────────── */
.progress-bar      { height: 6px; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #4f46e5, #7c3aed); border-radius: 9999px; transition: width .3s ease; }

/* ─── Tool card ────────────────────────────────────────── */
.tool-card { transition: transform .2s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px -8px rgba(0,0,0,.15); }

/* ─── Badge variants ───────────────────────────────────── */
.badge-hot     { background: #fef2f2; color: #dc2626; }
.badge-new     { background: #ecfdf5; color: #059669; }
.badge-popular { background: #fffbeb; color: #d97706; }

/* ─── Gradient text ────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Code / mono areas ────────────────────────────────── */
.code-area {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: .875rem;
  line-height: 1.6;
  tab-size: 2;
}

/* ─── Result area ──────────────────────────────────────── */
.result-section { animation: fadeInUp .35s ease-out; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Spinner ──────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2.5px solid #e5e7eb; border-top-color: #4f46e5; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ────────────────────────────────────────────── */
.toast {
  pointer-events: all;
  display: flex; align-items: center; gap: .625rem;
  background: white; border-radius: .75rem;
  padding: .75rem 1rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.05);
  font-size: .875rem; font-weight: 500;
  min-width: 260px; max-width: 380px;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
}
.toast.hide { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform: translateX(40px) scale(.95); } }
@keyframes toastOut { to   { opacity:0; transform: translateX(40px) scale(.95); } }

/* ─── Diff colors ──────────────────────────────────────── */
.diff-added   { background: #dcfce7; }
.diff-removed { background: #fee2e2; }
.diff-same    { background: transparent; }

/* ─── Color swatch ─────────────────────────────────────── */
.swatch { width: 40px; height: 40px; border-radius: .5rem; border: 2px solid rgba(0,0,0,.08); cursor: pointer; transition: transform .15s; }
.swatch:hover { transform: scale(1.1); }

/* ─── Range slider ─────────────────────────────────────── */
input[type="range"] { -webkit-appearance: none; height: 6px; border-radius: 9999px; background: #e5e7eb; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #4f46e5; cursor: pointer; box-shadow: 0 1px 4px rgba(79,70,229,.4); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #4f46e5; cursor: pointer; border: none; }

/* ─── Step numbers ─────────────────────────────────────── */
.step-number {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ─── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ─── Hero gradient ────────────────────────────────────── */
.hero-gradient { background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #ecfdf5 100%); }

/* ─── Section divider ──────────────────────────────────── */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent); }

/* ─── Smooth page load ─────────────────────────────────── */
body { animation: pageIn .25s ease; }
@keyframes pageIn { from { opacity: .7; } }

/* ─── Hide scrollbar but allow scroll ──────────────────── */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ════════════════════════════════════════════════════════
   MEGA MENU
   ════════════════════════════════════════════════════════ */
#mega-menu {
  animation: megaSlide .18s cubic-bezier(.4,0,.2,1);
}
@keyframes megaSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Active mega tab */
.mega-tab.active {
  background: #f8fafc;
  font-weight: 600;
  color: #1e293b;
}

/* ════════════════════════════════════════════════════════
   MOBILE DRAWER
   ════════════════════════════════════════════════════════ */
#mobile-drawer {
  /* transition-transform is set via Tailwind; this ensures smooth */
  will-change: transform;
}
#mobile-drawer.is-open {
  transform: translateX(0) !important;
}
#drawer-overlay.is-open {
  display: block !important;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR (inner pages)
   ════════════════════════════════════════════════════════ */
#tool-sidebar {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

/* ════════════════════════════════════════════════════════
   FOOTER ACCORDION (mobile / tablet < lg)
   ════════════════════════════════════════════════════════ */
.footer-tool-list {
  /* Default: hidden on mobile, visible on lg+ */
}
@media (max-width: 1023px) {
  .footer-tool-list {
    display: none;
  }
  .footer-tool-list.is-open {
    display: block;
    animation: ftoolOpen .2s ease-out;
  }
  @keyframes ftoolOpen {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ════════════════════════════════════════════════════════
   CATEGORY CHIP STRIP (scrollable row in nav)
   ════════════════════════════════════════════════════════ */
.cat-chip-strip {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-chip-strip::-webkit-scrollbar { display: none; }
