/* ===============================================
   UPLOAD-MODERN.CSS - Estilos modernos y minimalistas para upload y código postal
   =============================================== */

/* ===== CONTENEDOR PRINCIPAL ===== */
.upload-container-side {
    position: relative;
    width: 100%;
}

/* ===== LABEL DE UPLOAD ===== */
.upload-label-side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.upload-label-side i {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 0.875rem;
}

/* ===== ZONA DE UPLOAD (Estado inicial) ===== */
.upload-zone-side {
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
}

.upload-zone-side:hover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #faf9ff 0%, #f4f3ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.upload-zone-side:hover::before {
    left: 100%;
}

.upload-zone-side.dragover {
    border-color: #10b981;
    border-style: solid;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

/* ===== ESTADO VÁLIDO PARA UPLOAD ===== */
.upload-zone-side.is-valid {
    border-color: #10b981;
    border-style: solid;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.upload-zone-side.is-valid .upload-icon-side {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.upload-zone-side.is-valid .upload-title-side {
    color: #059669;
}

/* ===== CONTENIDO DE UPLOAD ===== */
.upload-content-side {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.upload-icon-side {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.upload-zone-side:hover .upload-icon-side {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.upload-text-side {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.upload-title-side {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    transition: color 0.3s ease;
}

.upload-zone-side:hover .upload-title-side {
    color: #6366f1;
}

.upload-subtitle-side {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* ===== PREVIEW DEL ARCHIVO ===== */
.file-preview-side {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    height: 120px;
    display: flex;
    align-items: center;
}

.file-preview-side:hover {
    border-color: #10b981;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.file-preview-side .d-flex {
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

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

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* ===== BOTÓN ELIMINAR ===== */
#removeFileBtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid #fee2e2;
    background: linear-gradient(135deg, #fef2f2 0%, #fef1f1 100%);
    color: #ef4444;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

#removeFileBtn:hover {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

#removeFileBtn:active {
    transform: scale(0.95);
}

/* ===== INDICADOR DE CARGA ===== */
.upload-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    z-index: 10;
}

.upload-loader .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: #6366f1;
}

.upload-loader p {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

/* ===== ANIMACIONES ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.file-preview-side {
    animation: slideInUp 0.4s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Upload zone responsive */
    .upload-zone-side,
    .file-preview-side {
        padding: 1.25rem;
        height: 100px;
    }
    
    .upload-icon-side,
    .file-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
    
    .upload-title-side,
    .file-name {
        font-size: 0.9rem;
    }
    
    .upload-subtitle-side,
    .file-size {
        font-size: 0.8rem;
    }
    
    #removeFileBtn {
        width: 36px;
        height: 36px;
    }
    
    /* Upload label responsive */
    .upload-label-side {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .upload-label-side i {
        width: 14px;
        height: 14px;
        font-size: 0.8rem;
    }
    
    /* Código postal responsive */
    .postal-input-side {
        height: 100px;
        padding: 0 1.25rem;
        line-height: 96px;
        font-size: 0.9rem;
    }
    
    .postal-label-side {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .postal-label-side i {
        width: 14px;
        height: 14px;
        font-size: 0.8rem;
    }
    
    .postal-loader-side {
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .postal-loader-side .spinner-border-sm {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .postal-feedback-side {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Botón centrado responsive */
    .action-section-bottom {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .action-btn-bottom {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        min-width: 180px;
    }
}

/* ===== ESTADOS FOCUS (Accesibilidad) ===== */
.upload-zone-side:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#removeFileBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.postal-input-side:focus-visible {
    outline: none;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15), 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ===== CÓDIGO POSTAL MODERNO ===== */
.postal-section-side {
    position: relative;
    width: 100%;
}

.postal-label-side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.postal-label-side i {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 0.875rem;
}

.postal-input-wrapper-side {
    position: relative;
}

.postal-input-group-side {
    position: relative;
    display: flex;
    align-items: center;
}

.postal-input-side {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    width: 100%;
    height: 120px;
    line-height: 116px;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.postal-input-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.postal-input-side:focus {
    outline: none;
    border-color: #6366f1;
    background: linear-gradient(135deg, #faf9ff 0%, #f4f3ff 100%);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.postal-input-side:focus::before {
    left: 100%;
}

.postal-input-side:hover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #faf9ff 0%, #f4f3ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.postal-input-side:hover::before {
    left: 100%;
}

.postal-input-side.is-valid {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #059669;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

/* Estilos específicos para autocompletado del navegador */
.postal-input-side.is-valid:-webkit-autofill {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #059669;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15), inset 0 0 0 1000px #f0fdf4;
    -webkit-text-fill-color: #059669;
}

.postal-input-side.is-valid:-moz-autofill {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #059669;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.postal-input-side.is-invalid {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.postal-input-side::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

/* Loader del código postal */
.postal-loader-side {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.postal-loader-side .spinner-border-sm {
    width: 1.5rem;
    height: 1.5rem;
    color: #6366f1;
}

/* Feedback de errores */
.postal-feedback-side {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 5;
}

.postal-feedback-side.postal-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    color: #dc2626;
}

.postal-feedback-side i {
    flex-shrink: 0;
}

/* ===== BOTÓN CENTRADO ===== */
.action-section-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.action-btn-bottom {
    border: none;
    border-radius: 16px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.action-btn-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.action-btn-bottom:hover::before {
    left: 100%;
}

.action-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #5b5ff7 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
    color: white;
}

.action-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.action-btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.action-btn-primary .btn-text {
    transition: opacity 0.3s ease;
}

.action-btn-primary .btn-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-btn-primary.loading .btn-text {
    opacity: 0;
}

.action-btn-primary.loading .btn-loader {
    opacity: 1;
}

/* ===== UTILIDADES ===== */
.hidden {
    display: none !important;
}

/* ===== ESTADO VÁLIDO PARA FILE PREVIEW ===== */
#filePreview.is-valid .file-preview-side {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15) !important;
}

#filePreview.is-valid .file-name {
    color: #059669 !important;
}

#filePreview.is-valid .file-size {
    color: #047857 !important;
} 