/* VMST Toolkit Shared CSS - Design System */

:root {
  --vmst-primary: #4f46e5;
  --vmst-primary-hover: #4338ca;
  --vmst-secondary: #06b6d4;
  --vmst-accent: #f43f5e;
  --vmst-background: #ffffff;
  --vmst-surface: #f8fafc;
  --vmst-text: #0f172a;
  --vmst-text-muted: #64748b;
  --vmst-border: #e2e8f0;
  --vmst-success: #10b981;
  --vmst-warning: #f59e0b;
  
  --vmst-radius-lg: 16px;
  --vmst-radius-md: 12px;
  --vmst-radius-sm: 8px;
  
  --vmst-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --vmst-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --vmst-glow: 0 0 20px rgba(79, 70, 229, 0.15);
}

/* Base Wrapper */
.vmst-tool-wrapper {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--vmst-text) !important;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: var(--vmst-background) !important;
  border: 1px solid var(--vmst-border) !important;
  border-radius: var(--vmst-radius-lg) !important;
  box-shadow: var(--vmst-shadow-lg) !important;
}

/* Force colors on children to prevent theme conflicts */
.vmst-tool-wrapper h1,
.vmst-tool-wrapper h2,
.vmst-tool-wrapper h3,
.vmst-tool-wrapper h4,
.vmst-tool-wrapper h5,
.vmst-tool-wrapper h6 {
  color: var(--vmst-text) !important;
}

.vmst-tool-wrapper p,
.vmst-tool-wrapper label,
.vmst-tool-wrapper span:not([class*="vmst-"]):not([style*="color"]) {
  color: var(--vmst-text) !important;
}

.vmst-tool-wrapper .vmst-text-muted {
  color: var(--vmst-text-muted) !important;
}

.vmst-tool-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.vmst-tool-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--vmst-text) 0%, var(--vmst-text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.vmst-tool-header p {
  color: var(--vmst-text-muted) !important;
  font-size: 1.1rem;
}

/* Card / Section styles */
.vmst-card-ui {
  background: var(--vmst-surface) !important;
  border: 1px solid var(--vmst-border) !important;
  border-radius: var(--vmst-radius-md) !important;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vmst-card-ui:hover {
  border-color: rgba(79, 70, 229, 0.2) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
}

/* Inputs & Buttons */
.vmst-input-group {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.vmst-input {
  flex-grow: 1;
  background: #ffffff !important;
  border: 1px solid var(--vmst-border) !important;
  border-radius: var(--vmst-radius-sm) !important;
  padding: 0.875rem 1.25rem !important;
  color: var(--vmst-text) !important;
  font-size: 1rem !important;
  transition: all 0.2s ease;
}

.vmst-input:focus {
  outline: none;
  border-color: var(--vmst-primary) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
  background: #ffffff !important;
}

.vmst-button {
  background: linear-gradient(135deg, var(--vmst-primary) 0%, var(--vmst-primary-hover) 100%);
  color: #fff !important;
  border: none;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: var(--vmst-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vmst-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.vmst-button:active {
  transform: translateY(0);
}

.vmst-button.secondary {
  background: #ffffff !important;
  border: 1px solid var(--vmst-border) !important;
  color: var(--vmst-text) !important;
  box-shadow: none;
}

.vmst-button.secondary:hover {
  background: #f1f5f9 !important;
  border-color: var(--vmst-text-muted) !important;
  box-shadow: none;
}

.vmst-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Drag & Drop Upload Zone */
.vmst-upload-zone {
  border: 2px dashed var(--vmst-border);
  border-radius: var(--vmst-radius-md);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  background: var(--vmst-surface) !important;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.vmst-upload-zone.dragover {
  border-color: var(--vmst-primary);
  background: rgba(79, 70, 229, 0.05);
  box-shadow: var(--vmst-glow);
}

.vmst-upload-icon {
  font-size: 3rem;
  color: var(--vmst-text-muted);
  transition: color 0.3s ease;
}

.vmst-upload-zone.dragover .vmst-upload-icon {
  color: var(--vmst-primary);
}

/* Progress bar */
.vmst-progress {
  width: 100%;
  background-color: var(--vmst-border);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.vmst-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--vmst-primary) 0%, var(--vmst-secondary) 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Toast Notifications */
.vmst-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.vmst-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 450px;
  background: rgba(30, 41, 59, 0.9);
  border-left: 4px solid var(--vmst-primary);
  border-top: 1px solid var(--vmst-border);
  border-right: 1px solid var(--vmst-border);
  border-bottom: 1px solid var(--vmst-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: var(--vmst-text);
  box-shadow: var(--vmst-shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  animation: vmst-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vmst-toast.success { border-left-color: var(--vmst-success); }
.vmst-toast.error { border-left-color: var(--vmst-accent); }
.vmst-toast.warning { border-left-color: var(--vmst-warning); }

.vmst-toast-close {
  background: none;
  border: none;
  color: var(--vmst-text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  display: flex;
  align-items: center;
}

.vmst-toast-close:hover {
  color: #fff;
}

@keyframes vmst-slide-in {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Result Box */
.vmst-result-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(10, 185, 129, 0.2);
  border-radius: var(--vmst-radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: none;
}

.vmst-result-box.active {
  display: block;
}

/* Toggle Switch */
.vmst-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.vmst-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.vmst-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--vmst-border);
  transition: .4s;
  border-radius: 34px;
}

.vmst-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .vmst-slider {
  background-color: var(--vmst-primary);
}

input:checked + .vmst-slider:before {
  transform: translateX(24px);
}

/* Force white background on the entire website body and containers on tool pages */
html:has(.vmst-tool-page-container),
body.vmst-tool-page,
body.vmst-tool-page #page,
body.vmst-tool-page #content,
body.vmst-tool-page .site,
body.vmst-tool-page .site-content,
body.vmst-tool-page .site-container,
body.vmst-tool-page #main,
body.vmst-tool-page .main-content-page,
body.vmst-tool-page #primary,
body.vmst-tool-page #wrapper,
body.vmst-tool-page .wrapper,
body.vmst-tool-page .page-wrapper,
body.vmst-tool-page #page-wrapper,
body.vmst-tool-page .site-layout,
body.vmst-tool-page .body-wrapper,
div:has(.vmst-tool-page-container),
section:has(.vmst-tool-page-container),
main:has(.vmst-tool-page-container) {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Force light background on inline dark containers in text tools (overriding rgba(0,0,0,0.2) or rgba(0,0,0,0.3)) */
.vmst-card-ui div[style*="background: rgba(0,0,0,0.2)"],
.vmst-card-ui div[style*="background:rgba(0,0,0,0.2)"],
.vmst-card-ui div[style*="background: rgba(0, 0, 0, 0.2)"],
.vmst-card-ui div[style*="background:rgba(0, 0, 0, 0.2)"],
.vmst-card-ui div[style*="background: rgba(0,0,0,0.3)"],
.vmst-card-ui div[style*="background:rgba(0,0,0,0.3)"],
.vmst-card-ui div[style*="background: rgba(0, 0, 0, 0.3)"],
.vmst-card-ui div[style*="background:rgba(0, 0, 0, 0.3)"],
.vmst-tab-content div[style*="background: rgba(0,0,0,0.2)"],
.vmst-tab-content div[style*="background:rgba(0,0,0,0.2)"],
.vmst-tab-content div[style*="background: rgba(0, 0, 0, 0.2)"],
.vmst-tab-content div[style*="background:rgba(0, 0, 0, 0.2)"],
.vmst-tab-content div[style*="background: rgba(0,0,0,0.3)"],
.vmst-tab-content div[style*="background:rgba(0,0,0,0.3)"],
.vmst-tab-content div[style*="background: rgba(0, 0, 0, 0.3)"],
.vmst-tab-content div[style*="background:rgba(0, 0, 0, 0.3)"] {
  background: var(--vmst-surface) !important;
  border-color: var(--vmst-border) !important;
}

/* Brighten tab navigations and default active states for Light Mode */
.vmst-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--vmst-border);
  padding-bottom: 0.5rem;
}

.vmst-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: var(--vmst-text-muted) !important;
  cursor: pointer;
  border-radius: var(--vmst-radius-sm);
  transition: all 0.2s ease;
}

.vmst-tab-btn:hover {
  background: var(--vmst-surface);
  color: var(--vmst-text) !important;
}

.vmst-tab-btn.active {
  background: var(--vmst-primary) !important;
  color: #ffffff !important;
}

/* Two-Column Grid Layout matching QR generator */
.vmst-tool-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .vmst-tool-grid {
    grid-template-columns: 1fr;
  }
}

.vmst-tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vmst-tool-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vmst-placeholder-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--vmst-surface);
  border: 1px dashed var(--vmst-border);
  border-radius: var(--vmst-radius-md);
  color: var(--vmst-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  box-sizing: border-box;
}

.vmst-placeholder-icon {
  font-size: 3rem;
  filter: grayscale(1);
  opacity: 0.6;
}

/* Stat Cards for Text and Utilities Tools */
.vmst-stat-card {
  background: var(--vmst-surface) !important;
  border: 1px solid var(--vmst-border) !important;
  border-radius: var(--vmst-radius-sm) !important;
  padding: 1.25rem 1rem !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.vmst-stat-card:hover {
  background: rgba(79, 70, 229, 0.04) !important;
  border-color: rgba(79, 70, 229, 0.2) !important;
  transform: translateY(-2px);
  box-shadow: var(--vmst-shadow) !important;
}

