/* ============================================================
   Modal Moderno Gob MX — estilos compartidos
   Fuente original: Content/login.css (usado en InicioSesion.cshtml)
   Consumido también por: Views/_GraficaBase.cshtml (barra de navegación)
   Requiere las variables --guinda-170/--guinda-150/--blanco, ya
   definidas globalmente en Content/sidebar.css.
   ============================================================ */

.no-display {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}

.fondo {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* Por encima de .sidebar (z-index: 1000 en sidebar.css) para que el
       backdrop cubra también la barra lateral; por debajo de .modal-moderno
       (z-index: 2000) para que el modal siga apareciendo al frente. */
    z-index: 1500;
    overflow-x: hidden;
}

.modal-moderno {
    z-index: 2000;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    min-width: 300px;
    max-height: 90vh;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.modal-moderno__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-moderno__label {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-moderno__close {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-moderno__close:hover {
    background-color: #e8e8e8;
}

.modal-moderno__close .material-symbols-outlined {
    font-size: 18px;
    color: #666;
}

.modal-moderno__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-moderno__body::-webkit-scrollbar {
    width: 6px;
}

.modal-moderno__body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-moderno__body::-webkit-scrollbar-thumb {
    background: var(--guinda-150);
    border-radius: 3px;
}

.modal-moderno__body::-webkit-scrollbar-thumb:hover {
    background: var(--guinda-170);
}

.modal-moderno__title {
    font-family: "Noto Sans", sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Modal con contenido largo desplazable (p. ej. Aviso de Privacidad) */
.modal-moderno--scroll {
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-moderno--scroll .modal-moderno__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.modal-moderno__scroll-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 20px;
    max-height: 50vh;
    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
}

.modal-moderno__scroll-content::-webkit-scrollbar {
    width: 6px;
}

.modal-moderno__scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-moderno__scroll-content::-webkit-scrollbar-thumb {
    background: var(--guinda-150);
    border-radius: 3px;
}

.modal-moderno__scroll-content::-webkit-scrollbar-thumb:hover {
    background: var(--guinda-170);
}

.modal-moderno__scroll-content h4 {
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--guinda-170);
    margin: 20px 0 10px 0;
}

.modal-moderno__scroll-content p {
    margin: 0 0 12px 0;
}

.modal-moderno__scroll-content ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.modal-moderno__scroll-content li {
    margin-bottom: 6px;
}

.modal-moderno__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-moderno__btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-moderno__btn--primary {
    background-color: var(--guinda-170);
    color: #fff;
}

.modal-moderno__btn--primary:hover {
    background-color: var(--guinda-150);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 34, 71, 0.3);
}

.modal-moderno__btn--primary:active {
    transform: translateY(0);
}

/* Responsive — valores efectivos equivalentes a los que ya aplican en el login */
@media (max-width: 480px) {
    .modal-moderno {
        width: 95%;
        max-width: none;
        min-width: auto;
        max-height: 90vh;
        margin: 0;
    }

    .modal-moderno__body {
        padding: 16px;
    }

    .modal-moderno__title {
        font-size: 20px;
    }

    .modal-moderno__btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }

    .modal-moderno__actions {
        flex-direction: column;
    }

    .modal-moderno--scroll .modal-moderno__body {
        max-height: calc(90vh - 60px);
    }

    .modal-moderno__scroll-content {
        max-height: calc(90vh - 180px);
        font-size: 13px;
    }

    .modal-moderno__scroll-content h4 {
        font-size: 14px;
    }

    .modal-moderno__scroll-content li {
        font-size: 13px;
    }
}
