/* ==============================================================================
   EMIPISA INDUSTRIAL - MOTOR DE CÁLCULO DE CORTE LÁSER CNC & MECANIZADO
   Diseño Oficial NATIVO Integrado en el Sistema de Tienda y Catálogo EMIPISA
   ============================================================================== */

/* Contenedor principal de la vista Láser */
#store-laser-view {
    overflow-y: visible !important;
    min-height: 100vh;
}

/* Layout Principal de 2 Columnas (Mismo formato de split de Tienda/Catálogo) */
.laser-studio-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 40px;
}

.laser-col-preview {
    position: sticky;
    top: 24px;
    align-self: start;
}

@media (max-width: 1080px) {
    .laser-studio-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .laser-col-preview {
        position: static;
    }
}

/* Overlay de carga del visualizador CAD */
.canvas-loading-overlay {
    display: none !important;
    position: absolute;
    inset: 0;
    background: rgba(11, 21, 35, 0.88);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.canvas-loading-overlay.active {
    display: flex !important;
}

/* Tarjetas Estándar EMIPISA */
.laser-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 22px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.laser-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.laser-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.laser-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.laser-card-title i {
    color: #0284c7;
    font-size: 16px;
}

/* DROPZONE VECTORIAL CAD */
.cad-dropzone {
    border: 2px dashed #0284c7;
    background: #f8fafc;
    border-radius: 10px;
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 14px;
    position: relative;
}

.cad-dropzone:hover {
    background: #f0f9ff;
    border-color: #0369a1;
}

.cad-dropzone.dragover {
    background: #eff6ff !important;
    border-color: #ea580c !important;
    border-style: solid !important;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.cad-dropzone.has-files {
    border-color: #10b981;
    background: #f0fdf4;
}

.dropzone-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.cad-dropzone:hover .dropzone-icon-wrap {
    background: #0284c7;
    color: #ffffff;
    transform: scale(1.05);
}

.dropzone-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.dropzone-sub {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.cad-format-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.format-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 2px 7px;
}

.dropzone-files-counter {
    margin-top: 10px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.counter-badge {
    color: #16a34a;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* PRESETS DE MUESTRA CAD (1-CLIC TEST) */
.sample-presets-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.sample-presets-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sample-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-preset-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.sample-preset-btn:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
}

.sample-preset-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

/* FORMULARIOS Y SELECTORES EMIPISA */
.laser-form-group {
    margin-bottom: 16px;
}

.laser-form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.laser-form-label i {
    color: #0284c7;
    margin-right: 4px;
}

.laser-form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.laser-form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* SELECTOR DE MODALIDAD (SOLO CORTE VS CORTE + MATERIAL) */
.modality-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.modality-option-card {
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modality-option-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.modality-option-card.active {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.04);
    box-shadow: 0 0 0 1px #0284c7;
}

.modality-radio-wrap {
    margin-top: 2px;
}

.modality-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.modality-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

/* CANTIDAD CON BOTONES STEPPER */
.qty-stepper-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.qty-step-btn {
    background: #f8fafc;
    border: none;
    color: #334155;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.15s;
}

.qty-step-btn:hover {
    background: #e2e8f0;
    color: #0284c7;
}

.qty-input-field {
    width: 65px;
    border: none;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    padding: 8px 0;
    outline: none;
}

/* VISOR CAD VECTORIAL 2D */
.cad-canvas-container {
    background: #091322;
    border: 1px solid #1e293b;
    border-radius: 10px;
    position: relative;
    height: 380px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#laserCadCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.cad-toolbar-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.cad-tool-btn {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cad-tool-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.cad-tool-btn.active {
    background: #ea580c;
    border-color: #ea580c;
    color: #ffffff;
}

.cad-bottom-badges {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.cad-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* MÉTRICAS PARAMÉTRICAS EN TIEMPO REAL */
.laser-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 480px) {
    .laser-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.laser-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-header {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-header i {
    color: #0284c7;
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

/* RESUMEN COMERCIAL Y BOTÓN DE ACCIÓN */
.laser-commercial-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px solid #bae6fd;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 16px;
}

.commercial-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.commercial-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.commercial-unit-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #0369a1;
}

.commercial-total-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.commercial-total-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 900;
    color: #0284c7;
    line-height: 1.1;
}

.commercial-total-tax-note {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* BOTÓN DE ACCIÓN PRINCIPAL EMIPISA */
.btn-laser-submit {
    width: 100%;
    padding: 14px 20px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
    margin-top: 18px;
}

.btn-laser-submit:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.btn-laser-submit:active {
    transform: translateY(0);
}

/* MODAL DE CONFIRMACIÓN DE SOLICITUD WEB (ESTILO NATIVO EMIPISA) */
.laser-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.laser-modal-overlay.active {
    display: flex;
}

.laser-modal-card {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    animation: laserModalFadeIn 0.22s ease-out;
}

@keyframes laserModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.laser-modal-header {
    background: #0b1a30;
    color: #ffffff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.laser-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.laser-modal-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.laser-modal-titles h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.laser-modal-titles p {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.laser-modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.laser-modal-close-btn:hover {
    color: #ffffff;
}

.laser-modal-body {
    padding: 24px;
}

.tracking-code-banner {
    background: #f0fdf4;
    border: 1.5px dashed #22c55e;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.tracking-code-label {
    font-size: 11.5px;
    font-weight: 800;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tracking-code-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 1px;
}

.modal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .modal-actions-grid {
        grid-template-columns: 1fr;
    }
}

.btn-modal-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-modal-action.primary {
    background: #0284c7;
    color: #ffffff;
}
.btn-modal-action.primary:hover {
    background: #0369a1;
}

.btn-modal-action.whatsapp {
    background: #22c55e;
    color: #ffffff;
}
.btn-modal-action.whatsapp:hover {
    background: #16a34a;
}

.btn-modal-action.secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}
.btn-modal-action.secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Toast Notificaciones Scoped */
.laser-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 999999;
}

.laser-toast.show {
    display: flex;
}
/* Toast Notificaciones Flotantes (Compacto y exclusivo para Colaboradores) */
.laser-toast-notify {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 999999;
    border: 1px solid rgba(56, 189, 248, 0.25);
    max-width: 320px;
    pointer-events: none;
}

.laser-toast-notify.show {
    display: flex;
}

.laser-toast-notify.toast-info {
    border-color: rgba(56, 189, 248, 0.45);
}
