/* Wexira Tools Base & Workspace Styles */
* { box-sizing: border-box; }

html, body {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

code, kbd, samp, pre, .font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* ==============================================================
   ANTI-CLS (Cumulative Layout Shift) PREVENTION
   Pre-renders structural layout before Tailwind CDN JS initializes
   ============================================================== */

/* 1. Immediate State Hiding: Prevents all 4 workspace states from rendering simultaneously */
.hidden,
[hidden],
#view-selected.hidden,
#view-processing.hidden,
#view-finished.hidden,
#file-input.hidden,
#loader-modal.hidden,
#alert-modal.hidden,
#file-controls.hidden,
#process-btn.hidden {
    display: none !important;
}

/* 2. Workspace Height Reservation: Prevents page jumping when tool mounts */
.native-tool-container {
    display: block;
    width: 100%;
    min-height: 520px;
    position: relative;
}

@media (max-width: 768px) {
    .native-tool-container {
        min-height: 460px;
    }
}

/* 3. Pre-defined Flex & Grid Structure (Eliminates JIT delay shifts) */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.w-full { width: 100%; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* 4. Icon Dimensions: Prevents icon pop-in layout shifts */
i[class*="ph-"],
i[class^="ph-"],
[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

/* ==============================================================
   TOOL WORKSPACE STYLES
   ============================================================== */

/* Pure Transparent Panels & Cards */
.glass-panel, .bg-transparent, [class*="bg-transparent"] {
    background: #000000 !important;
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Solid Crisp White Dashed Dropzone */
#dropzone, .dropzone {
    background: #000000 !important;
    background-color: #000000 !important;
    border: 2px dashed #ffffff !important;
    border-radius: 1.25rem !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 220px;
}

@media (max-width: 768px) {
    #dropzone, .dropzone {
        min-height: 160px;
        padding: 1.5rem 1rem !important;
    }
}

#dropzone:hover, .dropzone:hover, .dropzone-active {
    border-color: #a78bfa !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Dropdown & Option Visibility */
select {
    background-color: #7c3aed !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-weight: 700 !important;
}

select option {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
}

.mono { font-family: 'JetBrains Mono', monospace; }
.gradient-text { 
    background: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #38bdf8 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.gradient-bg { 
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%); 
}

/* Complete No-Glow Matte Style */
button, .gradient-bg, select, input, .slider-thumb, .img-slider-thumb, .after-wrapper, .after-img-wrapper {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}
button:hover, .gradient-bg:hover {
    box-shadow: none !important;
    filter: brightness(1.08) !important;
}


/* ==============================================================
   COMPREHENSIVE STATIC UTILITY ENGINE (Zero Tailwind CDN Delay)
   ============================================================== */

/* Display & Positioning */
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.overflow-hidden { overflow: hidden !important; }
.pointer-events-none { pointer-events: none !important; }
.cursor-pointer { cursor: pointer !important; }
.z-10 { z-index: 10 !important; }
.shrink-0 { flex-shrink: 0 !important; }
.flex-1 { flex: 1 1 0% !important; }
.min-w-0 { min-width: 0 !important; }

/* Offsets */
.top-3 { top: 0.75rem !important; }
.right-3 { right: 0.75rem !important; }
.left-3 { left: 0.75rem !important; }
.bottom-3 { bottom: 0.75rem !important; }
.top-1\/2 { top: 50% !important; }
.right-2\.5 { right: 0.625rem !important; }
.-translate-y-1\/2 { transform: translateY(-50%) !important; }

/* Alignment */
.items-stretch { align-items: stretch !important; }

/* Widths & Max Widths */
.max-w-xl { max-width: 36rem !important; }
.max-w-lg { max-width: 32rem !important; }
.max-w-md { max-width: 28rem !important; }
.max-h-80 { max-height: 20rem !important; }
.w-2 { width: 0.5rem !important; }
.h-2 { height: 0.5rem !important; }
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.h-full { height: 100% !important; }

/* Paddings */
.p-0\.5 { padding: 0.125rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 0.75rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-7 { padding-left: 1.75rem !important; padding-right: 1.75rem !important; }
.pr-8 { padding-right: 2rem !important; }

@media (min-width: 640px) {
    .sm\:p-6 { padding: 1.5rem !important; }
    .sm\:p-8 { padding: 2rem !important; }
    .sm\:p-12 { padding: 3rem !important; }
    .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}

/* Backgrounds */
.bg-black { background-color: #000000 !important; }
.bg-black\/75 { background-color: rgba(0, 0, 0, 0.75) !important; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05) !important; }
.bg-purple-600 { background-color: #9333ea !important; }
.bg-purple-500\/10 { background-color: rgba(168, 85, 247, 0.1) !important; }
.bg-purple-500\/20 { background-color: rgba(168, 85, 247, 0.2) !important; }
.bg-emerald-500 { background-color: #10b981 !important; }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1) !important; }
.bg-cyan-500\/10 { background-color: rgba(6, 182, 212, 0.1) !important; }
.bg-cyan-500\/20 { background-color: rgba(6, 182, 212, 0.2) !important; }
.bg-pink-500\/20 { background-color: rgba(236, 72, 153, 0.2) !important; }
.bg-yellow-400 { background-color: #facc15 !important; }

/* Borders */
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1) !important; }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15) !important; }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2) !important; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3) !important; }
.border-purple-500\/20 { border-color: rgba(168, 85, 247, 0.2) !important; }
.border-purple-500\/30 { border-color: rgba(168, 85, 247, 0.3) !important; }
.border-purple-500\/80 { border-color: rgba(168, 85, 247, 0.8) !important; }
.border-cyan-500\/30 { border-color: rgba(6, 182, 212, 0.3) !important; }
.border-pink-500\/30 { border-color: rgba(236, 72, 153, 0.3) !important; }
.border-t { border-top-width: 1px !important; border-top-style: solid !important; }
.border-b { border-bottom-width: 1px !important; border-bottom-style: solid !important; }

/* Typography */
.text-\[10px\] { font-size: 10px !important; line-height: 14px !important; }
.text-\[11px\] { font-size: 11px !important; line-height: 15px !important; }
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

@media (min-width: 640px) {
    .sm\:text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
    .sm\:text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
    .sm\:text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
    .sm\:text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
    .sm\:text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
}

.text-purple-400 { color: #c084fc !important; }
.text-purple-600 { color: #9333ea !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-cyan-400 { color: #22d3ee !important; }
.text-cyan-300 { color: #67e8f9 !important; }
.text-pink-300 { color: #f472b6 !important; }
.text-gray-200 { color: #e5e7eb !important; }
.truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.uppercase { text-transform: uppercase !important; }
.tracking-wider { letter-spacing: 0.05em !important; }
.leading-relaxed { line-height: 1.625 !important; }

/* Interactive & Animations */
.animate-spin { animation: spin 1s linear infinite !important; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.animate-bounce { animation: bounce 1s infinite !important; }
@keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); } 50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } }
