/* Inventario > Categorías/Almacenes — alta de almacén en una fila. */
html body #pvf-shell {
    --noalyx-brand-cyan: #08A6EC;
    --noalyx-brand-violet: #7042ED;
    --noalyx-brand-magenta: #D71979;
    --noalyx-brand-red: #F5013C;
}

/* Nuevo almacén puede abrirse desde producto, movimiento, ingreso y otros
   formularios modales. Su capa debe quedar por encima del modal de origen en
   cualquier tamaño de pantalla, sin modificar el diseño responsive. */
html body #pvf-shell #pv-modal-nuevo-almacen:not([hidden]) {
    z-index: 2147483600 !important;
    isolation: isolate !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
}

html body:has(#pv-modal-nuevo-almacen:not([hidden])) #pvf-shell
.pv-modal-overlay:not(#pv-modal-nuevo-almacen):not([hidden]) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 10px 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form > .pvf-row {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form > .pvf-row:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form > .pvf-row:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-action {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 2px !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-action > label {
    display: none !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-action > .rv-cat-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border: 0 !important;
    background: linear-gradient(100deg,
        var(--noalyx-brand-violet) 0%,
        #9634D2 38%,
        var(--noalyx-brand-magenta) 72%,
        var(--noalyx-brand-red) 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(80, 75, 214, .24) !important;
    text-shadow: 0 1px 1px rgba(33, 24, 70, .12) !important;
}

html body #pvf-shell .pvf-main-body .rv-cat-form-actions > .rv-cat-submit-btn,
html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-form-actions > button.pvf-btn.rv-cat-submit-btn {
    border: 0 !important;
    background: linear-gradient(100deg,
        var(--noalyx-brand-violet) 0%,
        #9634D2 38%,
        var(--noalyx-brand-magenta) 72%,
        var(--noalyx-brand-red) 100%) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 10px 22px rgba(112, 66, 237, .24) !important;
    text-shadow: 0 1px 1px rgba(33, 24, 70, .12) !important;
}

html body #pvf-shell .pvf-main-body .rv-cat-form-actions > .rv-cat-submit-btn .rv-cat-submit-icon {
    border-color: rgba(255, 255, 255, .7) !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
}

html body #pvf-shell .pvf-main-body .rv-cat-form-actions > .rv-cat-submit-btn .rv-cat-submit-icon svg {
    stroke: #fff !important;
}

html body #pvf-shell #pv-modal-nuevo-almacen #pv-nal-guardar-btn {
    border: 0 !important;
    background: linear-gradient(100deg,
        var(--noalyx-brand-violet) 0%,
        #9634D2 38%,
        var(--noalyx-brand-magenta) 72%,
        var(--noalyx-brand-red) 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(80, 75, 214, .24) !important;
}

html body #pvf-shell .pvf-main-body :is(
    .rv-warehouse-create-action > .rv-cat-submit-btn,
    .rv-cat-form-actions > .rv-cat-submit-btn
):not(:disabled):hover,
html body #pvf-shell #pv-modal-nuevo-almacen #pv-nal-guardar-btn:not(:disabled):hover {
    filter: brightness(1.05) saturate(1.04) !important;
    transform: translateY(-1px) !important;
}

html body #pvf-shell .pvf-main-body :is(
    .rv-warehouse-create-action > .rv-cat-submit-btn,
    .rv-cat-form-actions > .rv-cat-submit-btn
):focus-visible,
html body #pvf-shell #pv-modal-nuevo-almacen #pv-nal-guardar-btn:focus-visible {
    outline: 3px solid rgba(112, 66, 237, .23) !important;
    outline-offset: 3px !important;
}

html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form input[type="text"] {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Respaldo visual mientras el script retira el atributo placeholder. */
html body #pvf-shell .rv-warehouse-create-card .rv-warehouse-create-form input::placeholder,
html body #pvf-shell #pv-modal-nuevo-almacen :is(input, textarea)::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

@media (max-width:420px) {
    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form {
        gap: 9px 8px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form label {
        min-height: 21px !important;
        align-items: flex-end !important;
        font-size: 8.2px !important;
        line-height: 1.12 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-form input[type="text"] {
        height: 42px !important;
        min-height: 42px !important;
        padding-inline: 10px !important;
        font-size: 11px !important;
    }
}
