/* ==========================================================================
   VantorKit Design System & Mobile Shell Stylesheet
   Dark Slate Foundation • Single Cyan Accent • Zero Translucent Glass
   Full RTL / LTR Logical Properties • WCAG AA Contrast Compliance
   ========================================================================== */

/* --- Slate Palette Foundation & Design Tokens --- */
:root, :root:root {
  --bg: #020617;
  --bg-surface: #0f172a;
  --card-bg: #0f172a;
  --card-surface: #1e293b;
  --card-hover: #1e293b;
  --card-border: #1e293b;
  --card-border-hover: #334155;
  --text-main: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --accent: #06b6d4;
  --accent-hover: #38bdf8;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --badge-bg: #1e293b;
  --badge-text: #38bdf8;
  --focus-ring: #06b6d4;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   Collapsible Sidebar (☰) Component
   Scoped CSS: Prefixed with .vk-sidebar-*
   CSS Logical Properties for Natural RTL (right) & LTR (left) Sliding
   ========================================================================== */

/* --- Hamburger Toggle Button in Navbar --- */
.vk-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  outline: none;
  box-sizing: border-box;
}

.vk-sidebar-toggle:hover {
  background: #1e293b;
  border-color: #06b6d4;
  color: #38bdf8;
}

.vk-sidebar-toggle:focus-visible {
  background: #1e293b;
  border-color: #06b6d4;
  color: #38bdf8;
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

.vk-sidebar-toggle[aria-expanded="true"] {
  border-color: #06b6d4;
  background: #1e293b;
  color: #38bdf8;
}

.vk-sidebar-toggle-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* Helper Brand/Toggle Wrapper */
.vk-sidebar-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vk-sidebar-meta-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-inline-start: auto;
}

/* --- Favorite Star Button on Homepage Cards --- */
.vk-sidebar-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #1e293b;
  color: var(--text-subtle, #94a3b8);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
  outline: none;
  box-sizing: border-box;
}

.vk-sidebar-fav-btn:hover,
.vk-sidebar-fav-btn:focus-visible {
  background: #1e293b;
  border-color: #06b6d4;
  color: #38bdf8;
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

.vk-sidebar-fav-btn.vk-sidebar-fav-active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
}

.vk-sidebar-fav-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.vk-sidebar-fav-btn.vk-sidebar-fav-active .vk-sidebar-fav-icon {
  fill: #f59e0b;
}

/* --- Backdrop Overlay --- */
.vk-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  cursor: pointer;
}

.vk-sidebar-backdrop.vk-sidebar-open {
  opacity: 1;
  visibility: visible;
}

/* --- Sidebar Drawer (Overlay) Using CSS Logical Properties --- */
.vk-sidebar-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: 340px;
  max-width: 85vw;
  background: #0f172a;
  border-right: 1px solid #1e293b;
  border-left: none;
  border-top: none;
  border-bottom: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), visibility 220ms ease;
  will-change: transform;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main, #f1f5f9);
}

.vk-sidebar-drawer.vk-sidebar-open {
  transform: translateX(0) !important;
  visibility: visible;
}

/* RTL Drawer Sliding from Right */
html[dir="rtl"] .vk-sidebar-drawer {
  left: auto;
  right: 0;
  border-left: 1px solid #1e293b;
  border-right: none;
  transform: translateX(100%);
  font-family: 'Cairo', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: right;
}

html[dir="rtl"] .vk-sidebar-drawer.vk-sidebar-open {
  transform: translateX(0) !important;
  visibility: visible;
}

@media (min-width: 1024px) {
  .vk-sidebar-drawer {
    width: 340px;
    max-width: 360px;
  }
}

/* Body & HTML scroll lock when sidebar is open */
html.vk-sidebar-body-lock,
body.vk-sidebar-body-lock {
  overflow: hidden !important;
  touch-action: none;
}

/* --- Sidebar Header --- */
.vk-sidebar-header {
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  background: #0f172a;
  flex-shrink: 0;
}

.vk-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.vk-sidebar-brand-svg {
  width: 32px;
  height: 32px;
}

.vk-sidebar-brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.vk-sidebar-brand-title span {
  color: #06b6d4;
}

.vk-sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-subtle, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.vk-sidebar-close:hover,
.vk-sidebar-close:focus-visible {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* --- Sidebar Scrollable Body --- */
.vk-sidebar-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.vk-sidebar-body::-webkit-scrollbar {
  width: 5px;
}
.vk-sidebar-body::-webkit-scrollbar-track {
  background: transparent;
}
.vk-sidebar-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

/* --- Section Headers & Clear Button --- */
.vk-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vk-sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0.25rem;
}

.vk-sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.vk-sidebar-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  min-height: 32px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  box-sizing: border-box;
}

.vk-sidebar-clear-btn:hover,
.vk-sidebar-clear-btn:focus-visible {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  outline: 2px solid #ef4444;
  outline-offset: 1px;
}

.vk-sidebar-section-icon {
  width: 14px;
  height: 14px;
  color: #06b6d4;
}

.vk-sidebar-section-icon.vk-sidebar-icon-fav {
  color: #f59e0b;
}

.vk-sidebar-section-icon.vk-sidebar-icon-cat {
  color: #06b6d4;
}

/* --- Tool Lists & Items (Recently Used & Favorites) --- */
.vk-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vk-sidebar-tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  text-decoration: none;
  color: var(--text-main, #f1f5f9);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  min-height: 44px;
  box-sizing: border-box;
}

.vk-sidebar-tool-item:hover,
.vk-sidebar-tool-item:focus-visible {
  background: #334155;
  border-color: #06b6d4;
  outline: 2px solid #06b6d4;
  outline-offset: 1px;
}

.vk-sidebar-tool-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.vk-sidebar-tool-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #0f172a;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.vk-sidebar-tool-icon svg {
  width: 16px;
  height: 16px;
}

.vk-sidebar-tool-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.vk-sidebar-tool-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vk-sidebar-tool-cat {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-subtle, #94a3b8);
}

.vk-sidebar-tool-arrow {
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
  margin-inline-start: 0.35rem;
}

html[dir="rtl"] .vk-sidebar-tool-arrow {
  transform: rotate(180deg);
}

.vk-sidebar-tool-item:hover .vk-sidebar-tool-arrow {
  color: #06b6d4;
}

/* Star/Unstar button inside sidebar favorites list */
.vk-sidebar-tool-unstar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: #f59e0b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  outline: none;
  flex-shrink: 0;
  margin-inline-start: 0.35rem;
}

.vk-sidebar-tool-unstar:hover,
.vk-sidebar-tool-unstar:focus-visible {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  outline: 2px solid #f59e0b;
  outline-offset: 1px;
}

/* Empty States */
.vk-sidebar-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  background: #1e293b;
  border: 1px dashed #334155;
  border-radius: 10px;
  color: var(--text-subtle, #94a3b8);
}

.vk-sidebar-empty-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto 0.5rem;
  color: #64748b;
  opacity: 0.7;
}

.vk-sidebar-empty-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main, #f1f5f9);
  margin-bottom: 0.2rem;
}

.vk-sidebar-empty-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Categories List */
.vk-sidebar-cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vk-sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid transparent;
  color: var(--text-main, #f1f5f9);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  min-height: 44px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.vk-sidebar-cat-item:hover,
.vk-sidebar-cat-item:focus-visible {
  background: #334155;
  border-color: #06b6d4;
  outline: 2px solid #06b6d4;
  outline-offset: 1px;
}

.vk-sidebar-cat-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.vk-sidebar-cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #06b6d4;
}

.vk-sidebar-cat-arrow {
  color: #64748b;
  font-size: 0.75rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

html[dir="rtl"] .vk-sidebar-cat-arrow {
  transform: rotate(180deg);
}

/* Sidebar Footer */
.vk-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #1e293b;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
}

.vk-sidebar-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-subtle, #94a3b8);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  min-height: 44px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.vk-sidebar-footer-link:hover,
.vk-sidebar-footer-link:focus-visible {
  color: #fff;
  background: #1e293b;
  outline: 2px solid #06b6d4;
  outline-offset: 1px;
}

.vk-sidebar-footer-link svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Platform-Wide Slate Design System & Mobile Hardening Rules
   ========================================================================== */

/* Universal Dark Slate Foundation */
body {
  background-color: #020617 !important;
  color: #f1f5f9 !important;
}

/* Eliminate aggressive glassmorphism across all cards and shells */
.app-card,
.tool-card,
.feature-card,
.stat-card,
.doc-card,
.privacy-card,
.about-card {
  background-color: #0f172a !important;
  border: 1px solid #1e293b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.5) !important;
}

.tool-card:hover {
  background-color: #1e293b !important;
  border-color: rgba(6, 182, 212, 0.45) !important;
  box-shadow: 0 12px 28px -4px rgba(6, 182, 212, 0.15), 0 0 0 1px rgba(6, 182, 212, 0.2) !important;
}

/* Harmonized Slate Icon Containers across all 32 cards with Brand Cyan Accent */
.tool-icon-wrap {
  background: rgba(30, 41, 59, 0.8) !important; /* bg-slate-800/80 */
  border: 1px solid rgba(51, 65, 85, 0.6) !important; /* border-slate-700/60 */
  color: #94a3b8 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tool-card:hover .tool-icon-wrap {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
  color: #38bdf8 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2) !important;
}

/* High-contrast tool descriptions & visible slate card arrows */
.tool-desc {
  color: #cbd5e1 !important; /* text-slate-300 */
}

.card-arrow {
  color: #94a3b8 !important; /* text-slate-400 */
  opacity: 0.85 !important;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
}

.tool-card:hover .card-arrow {
  color: #38bdf8 !important; /* text-cyan-400 */
  opacity: 1 !important;
}

/* Full-Width Community CTA Dock ("Suggest New Tool" / "اقتراح أداة جديدة") */
.tool-card.card-request-tool {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  background-color: #0f172a !important; /* Clean Slate-900 */
  border: 1px solid #1e293b !important; /* Subtle border-slate-800 */
  border-radius: 16px !important;
  padding: 1.5rem 2rem !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1.5rem !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tool-card.card-request-tool:hover {
  background-color: #1e293b !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 12px 32px -4px rgba(6, 182, 212, 0.18), 0 0 0 1px rgba(6, 182, 212, 0.2) !important;
  transform: translateY(-2px) !important;
}

.card-request-dock-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
  flex: 1 1 auto;
}

.tool-card.card-request-tool .tool-icon-wrap {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(51, 65, 85, 0.6) !important;
  color: #38bdf8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.tool-card.card-request-tool:hover .tool-icon-wrap {
  border-color: #06b6d4 !important;
  background: rgba(6, 182, 212, 0.15) !important;
  color: #38bdf8 !important;
  transform: scale(1.05) !important;
}

.card-request-dock-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.card-request-dock-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-card.card-request-tool .tool-badge.request-badge {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  font-size: 0.7rem !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
}

.card-request-dock-action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.card-request-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #38bdf8;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tool-card.card-request-tool:hover .card-request-action-btn {
  background: #06b6d4 !important;
  border-color: #06b6d4 !important;
  color: #020617 !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35) !important;
}

.card-request-action-btn .card-arrow {
  color: currentColor !important;
  opacity: 1 !important;
  display: inline-flex;
  align-items: center;
}

.tool-card.card-request-tool:hover .card-arrow {
  transform: translateX(4px) !important;
}

html[dir="rtl"] .tool-card.card-request-tool:hover .card-arrow {
  transform: translateX(-4px) rotate(180deg) !important;
}

@media (max-width: 640px) {
  .tool-card.card-request-tool {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1.25rem !important;
    gap: 1rem !important;
  }

  .card-request-dock-content {
    align-items: flex-start !important;
    gap: 0.85rem !important;
  }

  .card-request-dock-action {
    width: 100% !important;
    justify-content: flex-end !important;
    margin-inline-start: 0 !important;
  }
}

/* Eliminate neon glowing borders and pulsing glow effects */
.ambient-glow {
  opacity: 0.1 !important;
  filter: blur(100px) !important;
  -webkit-filter: blur(100px) !important;
  animation: none !important;
}
.glow-purple, .glow-indigo {
  display: none !important;
}

/* Primary CTA Filled Buttons: Cyan-500 (#06b6d4) with DARK text (#020617) for WCAG AA (8.3:1) */
.btn-primary,
button.primary,
.btn-choose-file,
.video-trimmer-btn-browse,
.audio-trimmer-btn-browse,
.btn-export,
.btn-generate,
.btn-calculate,
.btn-submit-action,
.btn-convert-action {
  background-color: #06b6d4 !important;
  background-image: none !important;
  color: #020617 !important;
  border-color: #06b6d4 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.btn-primary:hover,
button.primary:hover,
.btn-choose-file:hover,
.video-trimmer-btn-browse:hover,
.audio-trimmer-btn-browse:hover,
.btn-export:hover,
.btn-generate:hover,
.btn-calculate:hover,
.btn-submit-action:hover,
.btn-convert-action:hover {
  background-color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  color: #020617 !important;
  box-shadow: none !important;
}

.btn-primary:focus-visible,
button.primary:focus-visible,
.btn-choose-file:focus-visible {
  outline: 2px solid #06b6d4 !important;
  outline-offset: 2px !important;
}

/* Active Category Tabs: Cyan with Dark Text */
.category-btn.active {
  background-color: #06b6d4 !important;
  background-image: none !important;
  color: #020617 !important;
  border-color: #06b6d4 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.category-btn.active .cat-dot {
  background-color: #020617 !important;
}

.category-btn:not(.active):hover {
  border-color: #38bdf8 !important;
  color: #fff !important;
}

/* Links & Accents */
a {
  color: #38bdf8;
}
a:hover {
  color: #7dd3fc;
}

/* Focus Ring */
:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

/* ==========================================================================
   Mobile Hardening (360px – 414px)
   ========================================================================== */

/* Increased vertical gap between cards on mobile */
@media (max-width: 640px) {
  .tools-grid,
  #toolsGrid {
    gap: 1.5rem !important;
  }
}

/* Interactive elements touch target minimum 44x44 px */
.category-btn,
.lang-btn,
.nav-blog-link,
.btn-sample-action,
.sample-pill,
.pill-btn,
.btn-replace-image {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Mobile Navbar Protection */
.navbar,
header.app-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-container {
  padding-inline: 0.75rem !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .nav-container {
    padding-inline: 0.5rem !important;
    gap: 0.35rem !important;
  }
  .brand-tag {
    display: none !important;
  }
  .brand-name {
    font-size: 1.05rem !important;
  }
  .nav-actions {
    gap: 0.35rem !important;
  }
  .brand-link {
    gap: 0.35rem !important;
  }
  .brand-logo-svg {
    width: 28px !important;
    height: 28px !important;
  }
  .nav-blog-link {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.8rem !important;
  }
  .lang-btn {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.8rem !important;
    gap: 0.35rem !important;
  }
}

/* Language Dropdown Menu Clipping Fix */
.lang-dropdown {
  position: relative !important;
  z-index: 101 !important;
}

.lang-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  width: 165px !important;
  max-width: calc(100vw - 1rem) !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 12px !important;
  padding: 0.35rem !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-sizing: border-box !important;
  z-index: 200 !important;
}

html[dir="rtl"] .lang-menu {
  left: 0 !important;
  right: auto !important;
}

/* Global Mobile Layout Hardening across all tool cards, grids and containers */
@media (max-width: 640px) {
  main,
  .main-content,
  .app-container,
  .tool-container,
  .container,
  .info-section {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-inline: 0.75rem !important;
  }

  .extractor-grid,
  .calc-grid,
  .tool-grid,
  .tools-grid,
  .faq-grid {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .app-card,
  .calc-card,
  .tool-shell,
  .faq-item {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.15rem !important;
  }

  .dropzone-privacy-badge {
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    word-break: break-word !important;
    font-size: 0.78rem !important;
    padding: 0.35rem 0.65rem !important;
    box-sizing: border-box !important;
  }

  .categories-wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .categories-bar {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mode-tabs,
  .tabs-wrapper,
  .tabs-container {
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    box-sizing: border-box !important;
  }

  .hero-ambient-bg {
    overflow: hidden !important;
    max-width: 100% !important;
  }

  .glow-cyan {
    width: 240px !important;
    height: 200px !important;
    left: 4% !important;
  }
}

/* Safety Net for Horizontal Overflow (clip preserves sticky header) */
html,
body {
  overflow-x: clip !important;
}

/* Global Footer GitHub Link */
.vk-sidebar-github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.vk-sidebar-github-link .vk-sidebar-github-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.vk-sidebar-github-link:hover .vk-sidebar-github-icon {
  transform: scale(1.12);
}

.vk-sidebar-github-link:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

/* Dropzone Privacy Trust Badge */
.dropzone-privacy-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.dropzone-privacy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 9999px;
  padding: 0.38rem 0.95rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  user-select: none;
}
