/* ==========================================================================
   BoxCraft Studio - Dark Mode (#000000) & Pro Responsive UI
   ========================================================================== */

:root {
    --bg-black: #000000;
    --panel-dark: #09090b;
    --panel-card: #121217;
    --border-dark: #27272a;
    --border-subtle: #1e1e24;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --cut-color: #f87171;
    --fold-color: #60a5fa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #000000;
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Lienzo de trabajo del molde (Workbench) */
#mold-viewport {
    background-color: #050507;
    background-image: 
        radial-gradient(#1f1f23 1px, transparent 1px),
        radial-gradient(#1f1f23 1px, #050507 1px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    cursor: grab;
    transition: background-color 0.2s ease;
}

#mold-viewport:active {
    cursor: grabbing;
}

/* Modo Taller / Pantalla Completa en fondo negro */
body.taller-mode #mold-container-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

body.taller-mode #taller-badge {
    display: inline-flex;
}

/* Botones de incremento (+ / -) con estilo dark */
.stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #e4e4e7;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.15s ease;
    user-select: none;
}

.stepper-btn:hover {
    background-color: #27272a;
    border-color: #3f3f46;
    color: #ffffff;
}

.stepper-btn:active {
    transform: scale(0.94);
}

/* Badges de Compatibilidad de Papel en Dark Mode */
.paper-badge {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.paper-badge.fits {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.paper-badge.no-fits {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    opacity: 0.65;
}

/* Tabs activas e inactivas */
.tab-btn {
    color: #a1a1aa;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    color: #f4f4f5;
}

.tab-btn.active {
    background-color: #18181b;
    color: #f59e0b;
    border-bottom: 2px solid #f59e0b;
    font-weight: 600;
}

/* Custom Dark Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #09090b;
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Range input styling dark */
input[type="range"] {
    accent-color: #f59e0b;
    background: #27272a;
    height: 5px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    #mold-viewport {
        min-height: 400px !important;
    }
}

/* Estilos de Impresión (@media print) */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    header, 
    #sidebar-panel, 
    .no-print, 
    .tab-nav,
    #view-3d,
    #view-guide,
    .mold-controls {
        display: none !important;
    }

    #main-content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #mold-container-card {
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        height: auto !important;
        background: #ffffff !important;
    }

    #mold-viewport {
        background: transparent !important;
        height: 85vh !important;
    }

    #print-sheet-header {
        display: block !important;
        margin-bottom: 12px;
        border-bottom: 2px solid #000;
        padding-bottom: 6px;
        color: #000000 !important;
    }
}
