/* ========================================
   FORMULARIO DTF - ESTILOS INDEPENDIENTES
   ========================================
   
   Este archivo contiene todos los estilos específicos
   para el formulario de subida de archivos DTF
   
   @package WC_DTF_Simple
   @version 2.1.0
*/

/* ========================================
   CALCULADOR DTF - ESTRUCTURA PRINCIPAL
   ======================================== */

.dtf-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   ZONA DE DROP - ESTADO INICIAL
   ======================================== */

.dtf-drop-zone {
    border: 3px dashed #e1e5e9;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dtf-drop-zone:hover {
    border-color: #007cba;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
}

.dtf-drop-zone.dtf-drag-over {
    border-color: #007cba;
    background: linear-gradient(135deg, #e6f3ff 0%, #f8fbff 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 124, 186, 0.25);
}

.dtf-drop-zone-content {
    position: relative;
    z-index: 2;
}

.dtf-upload-icon {
    margin-bottom: 20px;
    color: #007cba;
    animation: dtf-pulse 2s infinite;
}

.dtf-upload-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 124, 186, 0.2));
}

.dtf-drop-zone h3 {
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.dtf-upload-description {
    font-size: 16px;
    color: #646970;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.dtf-upload-actions {
    margin-bottom: 25px;
}

.dtf-upload-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.dtf-upload-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
}

/* Información de requisitos */
.dtf-upload-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px 20px;
    margin: 20px 0 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.dtf-requirement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    background: transparent; /* Fondo transparente */
    border: none; /* Sin borde */
    border-radius: 0; /* Sin bordes redondeados */
    padding: 8px 6px; /* Padding más compacto */
    box-shadow: none; /* Sin sombra */
    min-height: auto; /* Altura automática */
}

.dtf-requirement-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.dtf-requirement-text {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.dtf-requirement-text strong {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 1px;
}

.dtf-requirement-text span {
    font-size: 12px;
    color: #646970;
    line-height: 1.2;
}

/* Información de tarifas */
.dtf-pricing-info {
    margin: 20px 0 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e3f2fd;
}

.dtf-pricing-info h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.dtf-pricing-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dtf-tariff-info {
    text-align: center;
    margin-bottom: 10px;
}

.dtf-current-tariff {
    margin: 0;
    color: #2e7d32;
    font-size: 14px;
    font-weight: 500;
}

.dtf-pricing-simple {
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
}

.dtf-simple-price-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
    transition: all 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}

.dtf-simple-price-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.dtf-price-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.dtf-price-content {
    flex: 1;
    text-align: left;
}

.dtf-price-content h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dtf-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 5px 0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.dtf-price-amount span {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 4px;
}

.dtf-price-description {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Tarjetas de precios múltiples */
.dtf-pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.dtf-pricing-card {
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dtf-pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.dtf-pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dtf-pricing-card:hover::before {
    opacity: 1;
}

.dtf-card-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.dtf-card-range {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dtf-card-price {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.dtf-card-price span {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 3px;
}


.dtf-pricing-ranges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dtf-pricing-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dtf-pricing-range:hover {
    background: #f8f9fa;
    border-color: #007cba;
    transform: translateY(-1px);
}

.dtf-range-meters {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}

.dtf-range-price {
    font-weight: 600;
    color: #1976d2;
    font-size: 14px;
}

/* Responsive para requisitos */
@media (max-width: 768px) {
    .dtf-upload-requirements {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 12px;
        margin: 15px 0 10px 0;
    }
    
    .dtf-requirement-item {
        width: 100%;
        min-width: auto;
        padding: 6px 4px;
        gap: 3px;
    }
    
    .dtf-requirement-icon {
        font-size: 20px;
    }
    
    .dtf-pricing-info {
        margin: 15px 0 10px 0;
        padding: 12px;
    }
    
    .dtf-pricing-info h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .dtf-simple-price-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
        max-width: 100%;
    }
    
    .dtf-price-content {
        text-align: center;
    }
    
    .dtf-price-icon {
        font-size: 28px;
    }
    
    .dtf-price-content h5 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .dtf-price-amount {
        font-size: 24px;
    }
    
    .dtf-price-amount span {
        font-size: 13px;
    }
    
    .dtf-price-description {
        font-size: 12px;
    }
    
    .dtf-pricing-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dtf-pricing-card {
        padding: 16px;
    }
    
    .dtf-card-range {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .dtf-card-price {
        font-size: 20px;
    }
    
    .dtf-card-price span {
        font-size: 11px;
    }
    
    
    .dtf-pricing-range {
        padding: 6px 10px;
    }
    
    .dtf-range-meters {
        font-size: 12px;
    }
    
    .dtf-range-price {
        font-size: 13px;
    }
    
    .dtf-requirement-text strong {
        font-size: 12px;
    }
    
    .dtf-requirement-text span {
        font-size: 11px;
    }
}

.dtf-upload-limits {
    margin-top: 20px;
}

.dtf-upload-limits small {
    color: #8c8f94;
    font-size: 13px;
    line-height: 1.4;
}

/* ========================================
   LISTA DE ARCHIVOS
   ======================================== */

.dtf-files-list {
    margin-top: 30px;
}

.dtf-files-header {
    text-align: center;
    margin-bottom: 25px;
}

.dtf-files-header h4 {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
}

.dtf-files-subtitle {
    color: #646970;
    font-size: 14px;
    margin: 0;
}

.dtf-files-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

/* ========================================
   ELEMENTOS DE ARCHIVO INDIVIDUALES
   ======================================== */

.dtf-file-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dtf-file-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.15);
    transform: translateY(-1px);
}

.dtf-file-item.analyzing {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.dtf-file-item.analyzed {
    border-color: #c0c0c0;
    background: #ffffff;
}

.dtf-file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 20px;
}


.dtf-file-info {
	flex: 1;
	min-width: 0;
}

.dtf-file-name-section {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 12px;
}

.dtf-file-name {
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 0;
	word-break: break-word;
	width: 100%;
}

/* ========================================
   BADGES UNIFICADOS DE INFORMACIÓN DTF
   ======================================== */

/* Contenedor de badges debajo del título del archivo */
.dtf-file-info-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Estilos base para todos los badges */
.dtf-file-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 5px;

    font-size: 0.75em;
    font-weight: 600;
    border: 2px solid;
    white-space: nowrap;
    transition: all 0.3s ease;   
    min-width: 60px;
    justify-content: center;
}

/* Estados de los badges */
.dtf-file-badge.analyzing {
    background: #fff8e1;
    color: #f57c00;
    border-color: #e65100;
    animation: dtf-pulse 2s infinite;
}

.dtf-file-badge.analyzed {
    color: #2c3e50;
    border-color: #34495e;
}

/* Badge 1: Dimensiones - AZUL CARACTERÍSTICO */
.dtf-file-dimensions-badge {
    background: #e3f2fd;
    border-color: #1565c0;
    color: #0d47a1;
}

.dtf-file-dimensions-badge.analyzed {
    background: #e3f2fd;
    border-color: #1565c0;
    color: #0d47a1;
}

/* Indicador de corrección de orientación */
.dtf-file-dimensions-badge[title*="corregida"] {
    position: relative;
}

.dtf-file-dimensions-badge[title*="corregida"]::after {
    content: "🔄";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    background: #ff9800;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-orientation 2s infinite;
}

@keyframes pulse-orientation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}


/* Badge 3: Largo (Altura) - AMARILLO CARACTERÍSTICO */
.dtf-file-length-badge {
    background: #fff8e1;
    border-color: #f57c00;
    color: #e65100;
}

.dtf-file-length-badge.analyzed {
    background: #fff8e1;
    border-color: #f57c00;
    color: #e65100;
}

/* Badge 4: Copias - PÚRPURA CARACTERÍSTICO */
.dtf-file-copies-badge {
    background: #f3e5f5;
    border-color: #6a1b9a;
    color: #4a148c;
}

.dtf-file-copies-badge.analyzed {
    background: #f3e5f5;
    border-color: #6a1b9a;
    color: #4a148c;
}


/* Badge 6: Tipo de Archivo - GRIS CARACTERÍSTICO */
.dtf-file-type-badge {
    background: #f8f9fa;
    border-color: #495057;
    color: #343a40;
}

.dtf-file-type-badge.analyzed {
    background: #f8f9fa;
    border-color: #495057;
    color: #343a40;
}

/* Badge 7: Tamaño del Archivo - TEAL CARACTERÍSTICO */
.dtf-file-size-badge {
    background: #e6f7f4;
    border-color: #0d9488;
    color: #0f766e;
}

.dtf-file-size-badge.analyzed {
    background: #e6f7f4;
    border-color: #0d9488;
    color: #0f766e;
}

/* Badge 8: Precio Total - VERDE CARACTERÍSTICO */
.dtf-file-price-badge {
    background: #e8f5e8;
    border-color: #2e7d32;
    color: #1b5e20;
}

.dtf-file-price-badge.analyzed {
    background: #e8f5e8;
    border-color: #2e7d32;
    color: #1b5e20;
}

/* Iconos de los badges */
.dtf-file-badge .badge-icon {
    margin-right: 6px;
    font-size: 1em;
    opacity: 1;
    filter: brightness(1.1);
}


/* Hover effects */
.dtf-file-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

/* Focus effects para accesibilidad */
.dtf-file-badge:focus {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* ========================================
   METADATOS DEL ARCHIVO - BADGES UNIFICADOS
   ======================================== */

/* Los badges de metadatos ahora están integrados en .dtf-file-info-badges */
/* Todos los badges comparten los mismos estilos base */

/* ========================================
   CONTROLES COMPACTOS EN ESQUINA SUPERIOR DERECHA
   ======================================== */

.dtf-file-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 120px;
}

.dtf-copies-selector {
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dtf-copies-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dtf-copies-header label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dtf-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    flex-shrink: 0;
}

.dtf-remove-btn .dashicons {
    font-size: 16px;
    line-height: 1;
    width: auto;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.dtf-remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.4);
}

.dtf-copies-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dtf-copy-btn {
    background: #007cba;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.dtf-copy-btn:hover {
    background: #005a87;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 124, 186, 0.3);
}

.dtf-copy-btn.dtf-btn-clicked {
    transform: scale(0.95);
    background: #004a73;
}

.dtf-copies-input {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    width: 70px;
    min-width: 70px;
    text-align: center;
    padding: 6px 8px;
    background: white;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    -moz-appearance: textfield; /* Ocultar spinner en Firefox */
}

/* Ocultar spinner en Chrome, Safari y Edge */
.dtf-copies-input::-webkit-outer-spin-button,
.dtf-copies-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dtf-copies-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.dtf-copies-input:hover {
    border-color: #adb5bd;
}





/* ========================================
   ZONA DE AÑADIR MÁS ARCHIVOS CON DRAG & DROP
   ======================================== */

.dtf-add-more-files {
    margin-top: 30px;
    border: 2px dashed #28a745;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dtf-add-more-files:hover {
    border-color: #20c997;
    background: linear-gradient(135deg, #e6fff0 0%, #f8fff8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.dtf-add-more-files.dtf-drag-over {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #d4f7ff 0%, #e8f9ff 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(23, 162, 184, 0.25);
}

.dtf-add-more-content {
    position: relative;
    z-index: 2;
}

.dtf-add-more-icon {
    margin-bottom: 15px;
    color: #28a745;
    display: inline-block;
}

.dtf-add-more-icon svg {
    filter: drop-shadow(0 4px 8px rgba(40, 167, 69, 0.2));
}

.dtf-add-more-files h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.dtf-add-more-files p {
    font-size: 14px;
    color: #646970;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   BARRA MÉTRICA STICKY - DISEÑO MODERNO
   ======================================== */

.dtf-metric-bar {
    position: sticky;
    bottom: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    border-radius: 16px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.dtf-metric-bar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dtf-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.dtf-metric-stats {
    display: flex;
    gap: 32px;
}

.dtf-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dtf-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.dtf-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dtf-metric-pricing {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dtf-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.dtf-price-per-meter {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

.dtf-total-price {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* ========================================
   BARRA DE PROGRESO DE RANGOS - DISEÑO MODERNO
   ======================================== */

.dtf-range-progress {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dtf-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dtf-range-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.dtf-range-current {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 6px;
}

.dtf-range-track {
	position: relative;
	height: 20px;
	background: #f1f5f9;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
}

/* Contador de metros dentro de la barra de progreso */
.dtf-range-meter-counter {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 10px;
	font-weight: 700;
	color: white;
	z-index: 15;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	pointer-events: none;
	white-space: nowrap;
}

.dtf-range-segment {
    position: relative;
    height: 100%;
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.dtf-range-segment:last-child {
    border-right: none;
}

.dtf-range-segment-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0%;
	transition: width 0.3s ease;
	background: rgb(5 142 100 / 59%) !important; /* Barra de progreso verde */
}

.dtf-range-labels {
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.dtf-range-label {
	text-align: center;
	min-width: 40px;
}

/* Información de rangos debajo de la barra */
.dtf-range-info {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	gap: 8px;
}

.dtf-range-info-item {
	flex: 1;
	text-align: center;
	padding: 8px 4px;
	background: #f8fafc;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

.dtf-range-info-range {
	font-size: 11px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 2px;
}

.dtf-range-info-price {
	font-size: 12px;
	font-weight: 700;
	color: #059669;
}

.dtf-metric-left,
.dtf-metric-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.dtf-files-count,
.dtf-copies-count,
.dtf-total-meters,
.dtf-price-per-copy,
.dtf-total-price {
    display: flex;
    align-items: center;
    gap: 8px;   
    color: #495057;
}

.dtf-files-count strong,
.dtf-copies-count strong,
.dtf-total-meters strong,
.dtf-price-per-copy strong,
.dtf-total-price strong {
    color: #1d2327;
}

.dtf-create-order-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
}

.dtf-create-order-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

.dtf-create-order-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Estado de carga del botón */
.dtf-btn-loading {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    animation: dtf-btn-pulse 1.5s ease-in-out infinite;
}

.dtf-btn-loading .dtf-btn-icon {
    animation: dtf-icon-spin 1s linear infinite;
}

@keyframes dtf-btn-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* ========================================
   ESTILOS DE OPTIMIZACIÓN DTF
   ======================================== */

/* Badge de optimización */
.dtf-optimization-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 1px solid #b45309;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: dtf-optimization-pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.dtf-optimization-badge::before {
    content: "⚡";
    font-size: 12px;
}

/* Información de optimización */
.dtf-optimization-info {
    margin-top: 8px;
    padding: 8px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.dtf-optimization-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dtf-optimization-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #92400e;
}

.dtf-optimization-stats span {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #f59e0b;
    font-weight: 500;
    white-space: nowrap;
}

.dtf-savings {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #22c55e !important;
    font-weight: 600 !important;
}

.dtf-savings::before {
    content: "💰 ";
    margin-right: 2px;
}

/* Animación del badge de optimización */
@keyframes dtf-optimization-pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 8px rgba(245, 158, 11, 0.5);
        transform: scale(1.02);
    }
}

/* Estilos para el carrito */
.dtf-optimized-price {
    color: #059669;
    font-weight: 600;
}

.dtf-optimized-subtotal {
    color: #059669;
    font-weight: 600;
}

/* Responsive para información de optimización */
@media (max-width: 768px) {
    .dtf-optimization-stats {
        flex-direction: column;
        gap: 4px;
    }
    
    .dtf-optimization-stats span {
        text-align: center;
        padding: 4px 8px;
    }
    
    .dtf-optimization-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@keyframes dtf-icon-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dtf-btn-icon {
    font-size: 18px;
}

.dtf-btn-text {
    font-weight: 600;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .dtf-calculator {
        padding: 15px;
    }
    .dtf-file-name {
        text-align: center;
    }

    .dtf-drop-zone {
        padding: 40px 15px;
    }
    
    .dtf-drop-zone h3 {
        font-size: 24px;
    }
    
    .dtf-upload-description {
        font-size: 14px;
    }
    
    .dtf-file-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .dtf-file-controls {
        align-self: center;
    }
    

    
    .dtf-metric-bar-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px;
    }
    
    /* ✅ AJUSTAR FILA DE MÉTRICAS EN MÓVIL - MANTENER EN UNA FILA */
    .dtf-metric-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }
    
    /* ✅ MANTENER LOS 4 BLOQUES EN UNA FILA HORIZONTAL */
    .dtf-metric-stats {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .dtf-stat-item {
        flex: 1;
        min-width: 70px;
        align-items: center;
        padding: 8px 4px;
        background: #f8f9fa;
        border-radius: 6px;
    }
    
    .dtf-metric-left {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .dtf-metric-right {
        width: 100%;
    }
    
    .dtf-metric-pricing {
        flex-direction: row;
        gap: 12px;
        width: 100%;
        justify-content: space-between;
    }
    
    .dtf-price-info {
        flex: 1;
        align-items: center;
    }
    
    /* ✅ BOTÓN DE AÑADIR AL CARRITO MÁS COMPACTO */
    .dtf-create-order-btn {
        width: 100% !important;
        min-width: unset !important;
        justify-content: center;
        padding: 10px 16px !important;
    }
    
    .dtf-file-info-badges {
        gap: 4px;
        margin: 0;
        justify-content: center;
    }
    
    .dtf-file-badge {
        padding: 5px 8px;
        font-size: 0.7em;
        min-width: 80px;
        flex: 0 0 auto;
    }
    
    .dtf-file-badge .badge-icon {
        margin-right: 4px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .dtf-drop-zone {
        padding: 30px 10px;
    }
    
    .dtf-drop-zone h3 {
        font-size: 20px;
    }
    
    .dtf-upload-btn,
    .dtf-create-order-btn {
        padding: 12px 24px !important;
        font-size: 14px;
        width: 100% !important;
    }
    
    .dtf-stat-value {
        font-size: 18px;
    }
    
    .dtf-stat-label {
        font-size: 10px;
    }
    
    .dtf-total-price {
        font-size: 16px;
    }
    
    .dtf-price-per-meter {
        font-size: 12px;
    }
    
    .dtf-add-more-files {
        padding: 30px 15px;
    }
    
    .dtf-add-more-files h4 {
        font-size: 18px;
    }
    
    .dtf-add-more-files p {
        font-size: 13px;
    }
    
    .dtf-file-item {
        padding: 15px;
    }
    
    .dtf-file-controls {
        align-self: center;
    }
    
    .dtf-copies-selector {
        padding: 6px 10px;
    }
    
    .dtf-copy-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .dtf-remove-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .dtf-file-info-badges {
        gap: 3px;
        margin: 0;
        justify-content: center;
    }
    
    .dtf-file-badge {
        padding: 4px 6px;
        font-size: 0.65em;
        min-width: 70px;
    }
    
    .dtf-metric-left,
    .dtf-metric-right {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes dtf-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}



/* ========================================
   ACCESIBILIDAD
   ======================================== */

.dtf-calculator:focus-within {
    outline: 0;
    outline-offset: 0;
}

.dtf-file-badge:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.dtf-upload-btn:focus,
.dtf-add-more-files:focus,
.dtf-create-order-btn:focus,
.dtf-copy-btn:focus,
.dtf-remove-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ========================================
    RESPONSIVE EXTREMO PARA BADGES
    ======================================== */

/* En pantallas muy pequeñas, apilar badges en columna */
@media (max-width: 360px) {
    .dtf-file-info-badges {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .dtf-file-badge {
        min-width: 120px;
        justify-content: center;
    }
}

/* ========================================
    UTILIDADES
    ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
