/* Custom styling system for Parsify Pro */

textarea {
  resize: vertical;
}

textarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

textarea::-webkit-scrollbar-thumb {
  background-color: rgb(203 213 225);
  border-radius: 9999px;
}

textarea::-webkit-scrollbar-track {
  background-color: transparent;
}

.drop-zone.drop-zone-active {
  border-color: rgb(129 140 248);
  background-color: rgb(238 242 255);
}

.toast {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.spinner {
  border: 3px solid rgba(226, 232, 240, 0.8);
  border-top-color: rgb(99, 102, 241);
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Premium Visual Design System Extensions */

body {
  position: relative;
  overflow-x: hidden;
  background-color: #F8FAFC !important;
}

/* Primary text in light mode */
body:not(.dark) .text-slate-900,
body:not(.dark) h1,
body:not(.dark) h2,
body:not(.dark) h3,
body:not(.dark) h4 {
  color: #0F172A !important;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.035) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
  z-index: -9;
  filter: blur(50px);
  pointer-events: none;
}

/* High Fidelity Cards */
.premium-card {
  background: #FFFFFF !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  border-radius: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -2px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  border-color: rgba(99, 102, 241, 0.25);
}

/* Dynamic glow indicators */
.focus-glow:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Glowing text color and gradient links */
.text-indigo-750 {
  color: #4338ca;
}

.bg-indigo-650 {
  background-color: #4f46e5;
}

.text-indigo-650 {
  color: #4f46e5;
}

.border-indigo-650 {
  border-color: #4f46e5;
}

/* Micro-animations */
.hover-scale {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-scale:active {
  transform: scale(0.98);
}

/* Dark Mode Overrides */
html.dark body {
  background-color: #0b0f19 !important;
  color: #e2e8f0;
}

html.dark body::before {
  background-image: radial-gradient(circle at 1px 1px, rgba(129, 140, 248, 0.07) 1px, transparent 0);
}

html.dark body::after {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

html.dark .premium-card {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(12px);
  border-color: rgba(51, 65, 85, 0.8) !important;
  box-shadow: 0 12px 35px -12px rgba(0, 0, 0, 0.5) !important;
}

html.dark .premium-card:hover {
  border-color: rgba(129, 140, 248, 0.45) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 15px 1px rgba(99, 102, 241, 0.08) !important;
}

html.dark textarea::-webkit-scrollbar-thumb {
  background-color: rgb(71 85 105);
}

html.dark .focus-glow:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

/* Logo dynamic gradient overrides in dark mode */
html.dark .bg-gradient-to-r.from-indigo-700.to-indigo-900 {
  background-image: linear-gradient(to right, #818cf8, #a78bfa) !important;
}

/* Active indicators contrast overrides in dark mode */
html.dark .text-indigo-750 {
  color: #818cf8 !important;
}
html.dark .text-indigo-650 {
  color: #818cf8 !important;
}
html.dark .border-indigo-650 {
  border-color: #818cf8 !important;
}
html.dark .text-indigo-600 {
  color: #818cf8 !important;
}
html.dark .text-emerald-500 {
  color: #34d399 !important;
}

/* Global Header overrides under dark theme to keep them bright */
html.dark h1:not(.text-indigo-750), html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6 {
  color: #f8fafc !important;
}

/* Target-specific class overrides for slate text utility classes in dark mode */
html.dark .text-slate-900 { color: #f8fafc !important; }
html.dark .text-slate-850 { color: #f1f5f9 !important; }
html.dark .text-slate-800 { color: #e2e8f0 !important; }
html.dark .text-slate-750 { color: #e2e8f0 !important; }
html.dark .text-slate-700 { color: #cbd5e1 !important; }
html.dark .text-slate-600 { color: #94a3b8 !important; }
html.dark .text-slate-500 { color: #64748b !important; }
html.dark .text-slate-400 { color: #475569 !important; }

/* Interactive Hover Contrast mappings in dark mode */
html.dark .hover\:text-slate-900:hover { color: #f8fafc !important; }
html.dark .hover\:text-indigo-600:hover { color: #818cf8 !important; }
html.dark .hover\:bg-slate-50:hover { background-color: #1e293b !important; }

/* Background Overrides under dark theme */
html.dark .bg-white {
  background-color: #0f172a !important; /* slate-900 */
}
html.dark .bg-white\/90 {
  background-color: rgba(15, 23, 42, 0.9) !important;
}
html.dark .bg-white\/80 {
  background-color: rgba(15, 23, 42, 0.8) !important;
}
html.dark .bg-white\/60 {
  background-color: rgba(15, 23, 42, 0.6) !important;
}
html.dark .bg-slate-50 {
  background-color: #1e293b !important; /* slate-800 */
}
html.dark .bg-slate-100 {
  background-color: #1e293b !important; /* slate-800 */
}
html.dark .bg-slate-200\/80 {
  background-color: rgba(30, 41, 59, 0.8) !important;
}
html.dark .bg-indigo-50 {
  background-color: rgba(99, 102, 241, 0.15) !important;
}
html.dark .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.15) !important;
}
html.dark .bg-red-50 {
  background-color: rgba(239, 68, 68, 0.15) !important;
}

/* Border Overrides under dark theme */
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300,
html.dark .border-slate-350 {
  border-color: #334155 !important;
}
html.dark .border-indigo-100\/50,
html.dark .border-indigo-150,
html.dark .border-indigo-200 {
  border-color: rgba(99, 102, 241, 0.35) !important;
}
html.dark .border-emerald-200 {
  border-color: rgba(16, 185, 129, 0.35) !important;
}
html.dark .border-red-200 {
  border-color: rgba(239, 68, 68, 0.35) !important;
}

/* Global Input field elements under dark theme */
html.dark textarea, html.dark input, html.dark select {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html.dark textarea::placeholder, html.dark input::placeholder {
  color: #64748b !important;
}

html.dark .drop-zone {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .drop-zone:hover {
  background-color: #334155 !important;
}

/* Modal windows dark overrides */
html.dark #checkout-modal > div, html.dark #restore-modal > div, html.dark #restore-modal div {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

/* FAQ dropdown summary sections overrides */
html.dark details summary {
  color: #f8fafc !important;
}

html.dark details[open] {
  background-color: rgba(30, 41, 59, 0.4) !important;
}

/* AdSense slot dark mode borders */
html.dark .adsense-slot-wrapper {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

html.dark .adsense-slot-wrapper div {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

/* Call to Action (CTA) Button Gradient Overrides */
.bg-indigo-650,
#header-upgrade-btn,
#pro-buy-btn,
#restore-submit-btn,
[id$="-run-btn"] {
  background: linear-gradient(135deg, #4F46E5, #06B6D4) !important;
  border: none !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3) !important;
}

.bg-indigo-650:hover,
#header-upgrade-btn:hover,
#pro-buy-btn:hover,
#restore-submit-btn:hover,
[id$="-run-btn"]:hover {
  background: linear-gradient(135deg, #4338ca, #0891b2) !important;
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.45) !important;
  opacity: 0.95;
}

