/*imagen de los campos*/
.img_recuadre {
    display: none;
    width: 100%;
    height: auto;
    position: absolute;
    max-width: 100px;
    max-height: 100px;
}

.img_recuadre img {
    display: none;
    width: 100%;
    background-size: cover;
    max-width: 100px;
    max-height: 100px;
    border-radius: 16px;
}

.eye_zone_img:hover .img_recuadre {
    display: contents;
}

.eye_zone_img:hover .img_recuadre img {
    display: block;
}

/* Fin imagen de los campos*/

.detail-error {
    margin-bottom: 10px;
    cursor: pointer;
}

.detail-error>summary {
    padding: 15px 10px;
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.detail-error>.detail {
    background: #f3e6e7;
    border-radius: 0px 0px 7px 7px;
    padding: 0 10px;
}

.float-right {
    float: right !important;
}

.sec_pregunta {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.dataTable>thead,
tbody,
tfoot,
tr,
td,
th {
    white-space: inherit;
}

/*Select 2*/
.select2-container .select2-selection--single {
    height: 42px;
    padding: 0.5rem 1rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    box-shadow: none;
    border-color: #9dabf4;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #9dabf4;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted) {
    color: #000;
    background-color: #f9f9f9;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected::after,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted)::after {
    font-family: "Bootstrap-icons";
    content: "\F26E";
    font-weight: 900;
    float: right;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #eee;
    border-radius: 0.25rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #8a92a6;
}

/*TK20240118-cargue-masivo-archivos*/
.plupload_header {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.plupload_filelist_footer {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    padding: 1rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plupload_button {
    padding: 0.5rem 2rem !important;
    border-radius: 1rem !important;
}

/*admin preguntas*/
.border-resp-v {
    border: solid 1px #dcdcdc;
    border-radius: 11px;
}

/* Tarjetas con efecto hover y sombra */
.shadow-hover {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.shadow-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary);
}

/* Contenedor de imagen de tarjeta con efectos */
.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.card-img-container .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-img-container:hover .card-img-top {
    transform: scale(1.05);
}

/* Overlay de estado en imagen */
.card-img-overlay-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}

/* Badges de estado personalizados */
.status-badge {
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-completo {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-incompleto {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.status-pendiente {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

/* Botones de acción con efectos */
.btn-action {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-right: 0.25rem;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ====================================
   2. COMPONENTES DE BÚSQUEDA Y FILTROS
   ==================================== */

/* Tarjeta de controles de búsqueda */
.search-controls-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Grupo de input de búsqueda */
.search-input-group .input-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-input-group .input-group-text {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.search-input-group .form-control {
    border: 1px solid #dee2e6;
}

.search-input-group .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ====================================
   3. COMPONENTES DE RESULTADOS
   ==================================== */

/* Header de resultados */
.results-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.results-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count-text {
    font-weight: 600;
    color: var(--bs-dark);
    font-size: 0.95rem;
}

.loading-indicator {
    display: flex;
    align-items: center;
    color: var(--bs-primary);
    font-size: 0.9rem;
}

/* ====================================
   4. ESTADO VACÍO
   ==================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
    margin: 2rem 0;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--bs-secondary);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    color: var(--bs-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state-description {
    color: var(--bs-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ====================================
   5. VISTA DE TABLA MEJORADA
   ==================================== */

/* Contenedor de imagen en tabla */
.table-img-container {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-malla-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.table-img-container:hover .table-malla-img {
    transform: scale(1.1);
}

/* Información de malla en tabla */
.table-malla-info {
    min-width: 250px;
}

.table-malla-title {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.table-malla-description {
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge de estado en tabla */
.status-badge-table {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Acciones en tabla */
.table-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: nowrap;
}

.table-actions .btn {
    border-radius: 6px;
}

/* Tabla responsive mejorada */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(5px);
    transition: all 0.2s ease;
}

/* ====================================
   6. ANIMACIONES Y TRANSICIONES
   ==================================== */

/* Tarjetas animadas */
.animated-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alerta animada */
.animated-alert {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementos filtrados */
.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

/* ====================================
   7. COMPONENTES DE ALERTA MEJORADOS
   ==================================== */

.alert {
    border-radius: 0.5rem;
    border: none;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: #EDEEF1;
    color: #40444C;
}

.alert-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.alert-content {
    flex: 1;
}

.alert .detail-error {
    margin-bottom: 0;
}

.alert .detail-error>summary {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
    cursor: pointer;
    list-style: none;
}

.alert .detail-error>summary::-webkit-details-marker {
    display: none;
}

.alert .detail-error>summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.alert .detail-error[open]>summary::before {
    transform: rotate(90deg);
}

/* ====================================
   8. MODAL MEJORADO
   ==================================== */

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-radius: 0 0 15px 15px;
    border-top: 1px solid #dee2e6;
}

/* Items de detalle en modal */
.detail-item {
    margin-bottom: 1rem;
}

.detail-label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.9rem;
}

.detail-value {
    color: var(--bs-body-color);
    line-height: 1.4;
    word-wrap: break-word;
}

.badge-container {
    margin-top: 0.25rem;
}

/* ====================================
   9. UTILIDADES RESPONSIVAS
   ==================================== */

/* Ocultar elementos en móviles */
@media (max-width: 768px) {
    .table-actions .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }

    .table-actions .btn-group .dropdown-menu {
        font-size: 0.85rem;
    }

    .search-controls-card .row>div {
        margin-bottom: 1rem;
    }

    .results-header {
        padding: 0.75rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state-icon {
        font-size: 3rem;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .animated-card {
        margin-bottom: 1.5rem;
    }

    .table-actions .btn {
        padding: 0.3rem 0.5rem;
    }
}

/* ====================================
   10. ESTADOS Y FEEDBACK VISUAL
   ==================================== */

/* Loading states */
.btn-loading {
    pointer-events: none;
    position: relative;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Estados de éxito y error */
.status-success {
    border-left: 4px solid #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.status-error {
    border-left: 4px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.status-warning {
    border-left: 4px solid #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.status-info {
    border-left: 4px solid #17a2b8;
    background-color: rgba(23, 162, 184, 0.1);
}

/* ====================================
   11. MEJORAS DE ACCESIBILIDAD
   ==================================== */

/* Focus mejorado */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    border-color: var(--bs-primary);
}

/* Indicadores de estado accesibles */
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ====================================
   12. UTILIDADES ADICIONALES
   ==================================== */

/* Espaciado consistente */
.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}

.gap-xl {
    gap: 2rem;
}

/* Bordes redondeados */
.rounded-lg {
    border-radius: 12px;
}

.rounded-xl {
    border-radius: 15px;
}

.rounded-2xl {
    border-radius: 20px;
}

/* Sombras personalizadas */
.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shadow-strong {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Efectos de glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}