﻿/* =====================================================
   LOKER'S - Usuarios Modal
   FIX: opciones del select visibles (Windows/Chrome)
   ===================================================== */

:root {
    --um-bg: rgba(14, 24, 40, .96);
    --um-bg2: rgba(10, 18, 32, .96);
    --um-border: rgba(255,255,255,.10);
    --um-border2: rgba(255,255,255,.08);
    --um-text: rgba(255,255,255,.92);
    --um-muted: rgba(255,255,255,.65);
    --um-accent: #4ea1ff;
    --um-accent2: #2f6fff;
    --um-shadow: 0 28px 80px rgba(0,0,0,.70);
    /* Colores del dropdown nativo */
    --um-opt-bg: #0f1b2e;
    --um-opt-text: #ffffff;
    --um-opt-bg-selected: #2f6fff;
    --um-opt-text-selected: #ffffff;
}

/* ================= BACKDROP ================= */

.lkModal {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.modal-backdropx {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 18, .78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: umFadeIn .18s ease-out;
    z-index: 9998;
}

/* ================= WRAPPER ================= */

.modalx-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    z-index: 9999;
}

/* ================= MODAL ================= */

.modalx {
    width: 100%;
    max-width: 820px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--um-bg), var(--um-bg2));
    border: 1px solid var(--um-border);
    box-shadow: var(--um-shadow);
    overflow: hidden;
    animation: umPop .22s ease-out;
}

/* ================= HEADER ================= */

.modalx__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid var(--um-border2);
}

.modalx__title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--um-text);
    font-weight: 700;
    letter-spacing: .2px;
}

.modalx__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--um-accent), var(--um-accent2));
    box-shadow: 0 0 0 6px rgba(78,161,255,.12);
}

/* Botón cerrar */
.iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    cursor: pointer;
    transition: .18s ease;
    position: relative;
}

    .iconbtn::before,
    .iconbtn::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 16px;
        height: 2px;
        background: rgba(255,255,255,.85);
        transform-origin: center;
    }

    .iconbtn::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .iconbtn::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .iconbtn:hover {
        background: rgba(255,255,255,.12);
    }

/* ================= BODY ================= */

.modalx__body {
    padding: 20px;
}

/* ================= GRID ================= */

.usuario-modal-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 16px 18px;
}

    .usuario-modal-grid > * {
        min-width: 0;
    }

/* ================= FIELD ================= */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-size: 12.5px;
        font-weight: 650;
        color: var(--um-muted);
    }

/* ================= INPUTS ================= */

.inputx {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.045);
    color: var(--um-text);
    outline: none;
    transition: .18s ease;
}

    .inputx::placeholder {
        color: rgba(255,255,255,.35);
    }

    .inputx:focus {
        background: rgba(255,255,255,.06);
        border-color: rgba(78,161,255,.70);
        box-shadow: 0 0 0 3px rgba(78,161,255,.18);
    }

/* ================= SELECT (FIX VISIBILIDAD) ================= */

/* IMPORTANTÍSIMO: fuerza que el control nativo sea "dark" */
select.inputx {
    color-scheme: dark;
    /* mantiene el estilo del input */
    appearance: auto; /* dejamos nativo para que muestre bien el texto */
    -webkit-appearance: auto;
    -moz-appearance: auto;
    background-color: rgba(255,255,255,.045) !important;
    color: var(--um-text) !important;
}

    /* Forzar colores de opciones (cuando el browser lo permite) */
    select.inputx option {
        background-color: var(--um-opt-bg) !important;
        color: var(--um-opt-text) !important;
    }

        /* A veces :checked no lo respeta, pero cuando lo hace, queda pro */
        select.inputx option:checked {
            background-color: var(--um-opt-bg-selected) !important;
            color: var(--um-opt-text-selected) !important;
        }

/* ================= CHECKBOX ================= */

.check-field {
    grid-column: 1 / -1;
}

    .check-field label {
        display: flex;
        align-items: center;
        gap: 10px;
        color: rgba(255,255,255,.85);
        font-weight: 600;
    }

    .check-field input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--um-accent);
    }

/* ================= FOOTER ================= */

.modalx__foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,.035);
    border-top: 1px solid var(--um-border2);
}

/* Botones */
.btnx {
    border-radius: 12px;
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.92);
    cursor: pointer;
    transition: .18s ease;
    font-weight: 650;
}

    .btnx:hover {
        background: rgba(255,255,255,.12);
    }

.btnx-primary {
    border: none;
    background: linear-gradient(135deg, var(--um-accent), var(--um-accent2));
    box-shadow: 0 14px 34px rgba(47,111,255,.25);
}

    .btnx-primary:hover {
        box-shadow: 0 18px 44px rgba(47,111,255,.35);
    }

.btnx:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ================= ANIMATIONS ================= */

@keyframes umFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes umPop {
    from {
        transform: translateY(14px) scale(.985);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .usuario-modal-grid {
        grid-template-columns: 1fr;
    }
}
