/* Estilos específicos para navegadores antiguos */
/* Compatible con IE9+, Safari 5+, Chrome 10+, Firefox 4+, Opera 12+ */

/* Reset básico compatible */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Área de subida compatible */
.upload-area-legacy {
    background: #f0fdf4 !important; /* Fallback sólido en lugar de gradiente */
    border: 2px dashed #10b981;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    position: relative;
    /* Remover transform y transition problemáticos */
}

.upload-area-legacy:hover {
    border-color: #059669;
    background: #ecfdf5 !important;
    /* Sin transform ni efectos complejos */
}

.file-types-info {
    text-align: center;
    margin-top: 16px;
}

.file-type-item {
    display: inline-block;
    margin: 0 8px;
    padding: 4px 8px;
    background: #d1fae5;
    border-radius: 12px;
    font-size: 12px;
    color: #065f46;
}

/* Asegurar que los botones legacy tengan prioridad absoluta */
.btn-legacy {
    background: #059669 !important;
    background-color: #059669 !important;
    color: white !important;
    color: #ffffff !important;
    border: none !important;
    border: 0 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: 2px !important;
    font-family: Arial, sans-serif !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

.btn-legacy:hover,
.btn-legacy:focus,
.btn-legacy:active {
    background: #047857 !important;
    background-color: #047857 !important;
    color: white !important;
    color: #ffffff !important;
    text-decoration: none !important;
    outline: none !important;
}

.btn-primary-legacy {
    background: #059669 !important;
    background-color: #059669 !important;
}

.btn-secondary-legacy {
    background: #6b7280 !important;
    background-color: #6b7280 !important;
}

.btn-secondary-legacy:hover,
.btn-secondary-legacy:focus,
.btn-secondary-legacy:active {
    background: #4b5563 !important;
    background-color: #4b5563 !important;
}

.btn-danger-legacy {
    background: #ef4444;
    color: white;
}

.btn-danger-legacy:hover {
    background: #dc2626;
}

/* Layout compatible sin flexbox/grid */
.container-legacy {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.row-legacy {
    width: 100%;
    *zoom: 1; /* IE7 clearfix */
}

.row-legacy:before,
.row-legacy:after {
    content: "";
    display: table;
}

.row-legacy:after {
    clear: both;
}

.col-legacy {
    float: left;
    width: 100%;
    padding: 0 8px;
    margin-bottom: 16px;
}

.col-half-legacy {
    width: 50%;
}

.col-third-legacy {
    width: 33.333%;
}

.col-quarter-legacy {
    width: 25%;
}

/* Cards compatibles */
.card-legacy {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    /* Sin sombras complejas */
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-legacy:hover {
    border-color: #cbd5e1;
    /* Sin transforms */
}

/* Modal completamente compatible con navegadores antiguos */
.modal-legacy {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    background-color: rgba(0,0,0,0.8) !important;
    z-index: 99999 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.modal-legacy.show {
    display: block !important;
    visibility: visible !important;
}

.modal-content-legacy {
    position: absolute !important;
    top: 10% !important;
    left: 50% !important;
    width: 90% !important;
    max-width: 1000px !important;
    min-height: 400px !important;
    max-height: 80% !important;
    background: white !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: -45% !important;
    overflow: hidden !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5) !important;
    -webkit-box-shadow: 0 8px 16px rgba(0,0,0,0.5) !important;
    -moz-box-shadow: 0 8px 16px rgba(0,0,0,0.5) !important;
    border: 2px solid #ccc !important;
}

/* Iframe para PDFs */
.pdf-iframe-legacy {
    width: 100%;
    height: 500px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

/* Loading spinner simple */
.spinner-legacy {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    margin: 20px auto;
    /* Animación simple compatible */
    -webkit-animation: spin-legacy 1s linear infinite;
    -moz-animation: spin-legacy 1s linear infinite;
    animation: spin-legacy 1s linear infinite;
}

@-webkit-keyframes spin-legacy {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@-moz-keyframes spin-legacy {
    0% { -moz-transform: rotate(0deg); }
    100% { -moz-transform: rotate(360deg); }
}

@keyframes spin-legacy {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades de texto */
.text-center-legacy {
    text-align: center;
}

.text-left-legacy {
    text-align: left;
}

.text-right-legacy {
    text-align: right;
}

.hidden-legacy {
    display: none !important;
}

.show-legacy {
    display: block !important;
}

/* Colores de estado */
.text-success-legacy {
    color: #059669;
}

.text-error-legacy {
    color: #dc2626;
}

.text-warning-legacy {
    color: #d97706;
}

.bg-success-legacy {
    background: #d1fae5;
}

.bg-error-legacy {
    background: #fee2e2;
}

.bg-warning-legacy {
    background: #fef3c7;
}

/* Responsive básico */
@media screen and (max-width: 768px) {
    .col-half-legacy,
    .col-third-legacy,
    .col-quarter-legacy {
        width: 100%;
    }
    
    .modal-content-legacy {
        width: 95%;
        margin-left: -47.5%;
        padding: 16px;
    }
    
    .upload-area-legacy {
        padding: 24px;
    }
}

@media screen and (max-width: 480px) {
    .container-legacy {
        padding: 0 8px;
    }
    
    .upload-area-legacy {
        padding: 16px;
    }
    
    .btn-legacy {
        padding: 8px 16px;
        font-size: 14px;
    }
}