﻿/* SagRRHH/wwwroot/css/styles.css */

.rrhh-contenedor {
    border: 2px solid #005c99; /* Azul corporativo */
    background-color: #f0f8ff; /* AliceBlue */
    padding: 20px;
    border-radius: 8px;
    margin: 10px 0;
}

.rrhh-titulo {
    color: #004080;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.rrhh-grid-scroll {
    width: 100%;
    overflow-x: auto;
}

/* Toast notifications - siempre por encima de todo */
.blazored-toast-container {
    position: fixed !important;
    z-index: 99999 !important;
}

.blazored-toast {
    z-index: 99999 !important;
}

.toast-container {
    position: fixed !important;
    z-index: 99999 !important;
}

.toast {
    z-index: 99999 !important;
}

/* Fix para que el typeahead escape del modal */
.rrhh-typeahead_position_fixed__results .blazored-typeahead__results {
    position: fixed !important;
    z-index: 99999 !important;
    width: auto !important;
    max-width: none !important;
    overflow-y: auto;
    min-height: 2rem;
    max-height: 400px;
}

.rrhh-typeahead_position_absolute__results .blazored-typeahead__results {
    position: absolute !important;
    z-index: 99999 !important;
    width: auto !important;
    max-width: none !important;
    overflow-y: auto;
    min-height: 2rem;
    max-height: 400px;
}

/* Fix específico para typeahead dentro de input-group */
.input-group .rrhh-typeahead_position_absolute__results {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

    .input-group .rrhh-typeahead_position_absolute__results .blazored-typeahead {
        width: 100%;
    }

/* === Estado de carga / error / vacío para reportes === */
.report-state {
    text-align: center;
    padding: 50px;
}

.report-state-error {
    color: red;
}

/* Fix para R_ClasificacionesContables cuando se usa dentro de SagRegistroModal */
.rrhh-clasificaciones-wrapper {
    display: contents; /* Permite que los botones se comporten como si no hubiera wrapper */
}

    /* Asegurar que el modal de clasificaciones aparezca por encima del modal de préstamos */
    .rrhh-clasificaciones-wrapper .modal-position-fixed .sag-modal-shadow {
        position: fixed !important;
        z-index: 2000 !important; /* Mayor que SagRegistroModal (1050) */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important; /* Centra verticalmente */
    }

    /* Asegurar que el cuerpo del modal también tenga z-index correcto y no use margin auto */
    .rrhh-clasificaciones-wrapper .modal-position-fixed .sag-modal-body {
        z-index: 2001 !important;
        margin: 0 !important; /* Elimina el margin auto que lo empuja hacia arriba */
    }

    /* Asegurar que el typeahead dentro del modal de clasificaciones escape correctamente */
    .rrhh-clasificaciones-wrapper .fix-typeahead__resultsContable > .blazored-typeahead > .blazored-typeahead__results {
        position: fixed !important;
        z-index: 2100 !important;
        max-width: 48vw !important;
    }

    /* Estilo del botón de cerrar igual a SagRegistroModal */
    .rrhh-clasificaciones-wrapper .modal-position-fixed .card-header .close {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1;
        color: #000;
        opacity: 0.5;
        padding: 0;
        cursor: pointer;
        position: absolute;
        top: 15px;
        right: 15px;
        transition: opacity 0.2s ease;
    }

        .rrhh-clasificaciones-wrapper .modal-position-fixed .card-header .close:hover {
            opacity: 0.75;
        }

        .rrhh-clasificaciones-wrapper .modal-position-fixed .card-header .close:focus {
            outline: none;
        }