/* ========================================
   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);
}

.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 {
    margin-bottom: 8px;
}

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

/* ========================================
   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: 12px 0;
    padding: 0;
}

/* 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 2: DPI - NARANJA CARACTERÍSTICO */
.dtf-file-dpi-badge {
    background: #fff3e0;
    border-color: #e65100;
    color: #bf360c;
}

.dtf-file-dpi-badge.analyzed {
    background: #fff3e0;
    border-color: #e65100;
    color: #bf360c;
}

/* 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 5: Precio - 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;
}

/* 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;
}

/* 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-display {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    min-width: 24px;
    text-align: center;
    padding: 4px 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}





/* ========================================
   BOTÓN DE AÑADIR MÁS ARCHIVOS
   ======================================== */

.dtf-add-more-files {
    text-align: center;
    margin-top: 30px;
}

.dtf-add-more-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dtf-add-more-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.dtf-add-more-btn .dashicons {
    font-size: 18px;
}

/* ========================================
   BARRA MÉTRICA STICKY
   ======================================== */

.dtf-metric-bar {
    position: sticky;
    bottom: 10px;
    background: white;
    border: solid 3px #525252;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    border-radius: 5px;
    z-index: 1000;
}

.dtf-metric-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

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

.dtf-files-count,
.dtf-copies-count,
.dtf-total-meters,
.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-total-price strong {
    color: #1d2327;
}

.dtf-create-order-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.dtf-create-order-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

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

/* ========================================
   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: 20px;
        text-align: center;
    }
    
    .dtf-metric-left,
    .dtf-metric-right {
        justify-content: center;
        gap: 20px;
    }
    
    .dtf-file-info-badges {
        gap: 4px;
        margin: 8px 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-add-more-btn,
    .dtf-create-order-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .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: 6px 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-btn: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;
}
