/* Fase 10.1 — verbatim de wwwroot/css/rest-admin-config.css del proyecto actual. Se enlaza desde RestAdminLayout (antes global en _Host).
   Cambios: capas D-51 (.racf-back → --z-modal). */

.ra-plano {
    position: relative;
    width: 960px;
    max-width: 100%;
    height: 380px;
    background: #f8fafc;
    border: 1px dashed #d3dcea;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    cursor: crosshair;
}

.ra-plano-grid {
    background-image: repeating-linear-gradient(to right, #e2e8f0 0, #e2e8f0 1px, transparent 1px, transparent 10%), repeating-linear-gradient(to bottom, #e2e8f0 0, #e2e8f0 1px, transparent 1px, transparent 10%);
    background-size: 10% 10%;
}

/* Antes ".ra-mesa" — renombrada para no chocar con el widget "Mesas ahora"
   de RestAdminResumenPage.razor, que ya usaba ese mismo nombre. */
.ra-mesa-plano {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border: 3px solid #94a3b8;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: transform .12s ease;
    user-select: none;
}

    .ra-mesa-plano:hover {
        transform: translate(-50%, -50%) scale(1.06);
    }

    .ra-mesa-plano.sel {
        outline: 3px solid #1a4fba;
        outline-offset: 2px;
    }

    .ra-mesa-plano.cuadrada {
        border-radius: 8px;
    }

    .ra-mesa-plano.redonda {
        border-radius: 50%;
    }

    .ra-mesa-plano.rect {
        width: 88px;
        height: 52px;
        border-radius: 8px;
    }

    .ra-mesa-plano.alerta {
        animation: ra-pulso 1.2s infinite;
    }

    .ra-mesa-plano small {
        font-weight: 500;
        opacity: .9;
    }

@keyframes ra-pulso {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(220,38,38,.25);
    }

    50% {
        box-shadow: 0 2px 14px rgba(220,38,38,.65);
    }
}

.ra-leyenda {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #556;
}

.ra-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

/* ── contador dentro de una .rac-tab ─────────────────────── */
.racf-n {
    font: 700 10px Inter, sans-serif;
    background: #eef1f7;
    color: #4b5670;
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 6px;
}

.rac-tab.on .racf-n {
    background: var(--ra-cobalt-pale);
    color: var(--ra-cobalt-deep);
}

/* ── modal Cobalt Elegante ───────────────────────────────── */
.racf-back {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 38, .52);
    z-index: var(--z-modal); /* D-51 (era 80) */
    display: grid;
    place-items: center;
    padding: 40px 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.racf-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(8, 16, 36, .42);
}

    .racf-modal.sm {
        max-width: 560px;
    }

.racf-mh {
    background: linear-gradient(135deg, #0f3494, #2d6ae0);
    color: #fff;
    padding: 13px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 0 0 auto;
}

    .racf-mh b {
        display: block;
        font-size: 14.5px;
        letter-spacing: -.2px;
        color: #fff;
    }

    .racf-mh small {
        display: block;
        font-size: 11.5px;
        color: rgba(255, 255, 255, .78);
        margin-top: 2px;
        line-height: 1.45;
    }

    .racf-mh > div:first-child {
        flex: 1;
        min-width: 0;
    }

.racf-x {
    width: 31px;
    height: 31px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

    .racf-x i {
        font-size: 13px;
        color: #fff;
    }

    .racf-x:hover {
        background: rgba(255, 255, 255, .27);
    }

/* Tope de alto + scroll interno: si el buscador (insumos, botellas) trae
   muchos resultados, la lista scrollea DENTRO del modal en vez de seguir
   creciendo y arrastrar toda la página con ella. */
.racf-mb {
    padding: 16px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.racf-mf {
    padding: 11px 16px;
    border-top: 1px solid var(--ra-line);
    background: #fbfcfe;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex: 0 0 auto;
}

/* ── sub-tarjeta gris dentro del modal ───────────────────── */
.racf-box {
    border: 1px solid var(--ra-line);
    border-radius: 11px;
    background: #fbfcfe;
    padding: 12px;
    margin-top: 10px;
}

.racf-box-h {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

    .racf-box-h b {
        font-size: 12.5px;
    }

    .racf-box-h i {
        color: var(--ra-cobalt);
        font-size: 13px;
    }

    .racf-box-h .ra-sp {
        flex: 1;
    }

/* ── fila de opción de un grupo de modificadores ─────────── */
.racf-op {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--ra-line);
    flex-wrap: wrap;
}

    .racf-op:last-child {
        border-bottom: none;
    }

    .racf-op .grip {
        color: #c5cfe2;
        font-size: 12px;
        flex: 0 0 auto;
    }
    .racf-op.click {
        border: none;
        background: #fff;
        width: 100%;
        text-align: left;
        font: inherit;
        color: inherit;
        cursor: pointer;
        border-radius: 9px;
        padding: 9px 10px;
        margin-bottom: 3px;
        border-bottom: none;
    }

        .racf-op.click:last-child {
            margin-bottom: 0;
        }

        .racf-op.click:hover {
            background: var(--ra-cobalt-subtle);
        }

        .racf-op.click:disabled {
            opacity: .5;
            cursor: not-allowed;
        }
/* ── recuadro de la llave recién generada ────────────────── */
.racf-key {
    border: 2px dashed var(--ra-cobalt);
    border-radius: 12px;
    background: var(--ra-cobalt-subtle);
    padding: 14px;
    margin-bottom: 16px;
}

.racf-key-v {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1px solid var(--ra-cobalt-pale);
    border-radius: 7px;
    padding: 9px 11px;
    margin: 9px 0;
}

    .racf-key-v code {
        flex: 1;
        min-width: 0;
        font: 600 13px ui-monospace, monospace;
        color: var(--ra-cobalt-deep);
        word-break: break-all;
        line-height: 1.45;
    }

/* ── línea chica bajo un dato de tabla (latido, aviso) ───── */
.racf-lat {
    display: block;
    font-size: 11px;
    color: var(--ra-ink-3);
    margin-top: 2px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .racf-modal {
        max-width: none;
    }
}
