/* PLANILLA: SELECTOR COMPACTO Y VISTA PREVIA A4 HORIZONTAL */
.modal-planilla-fondo.abierto {
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-pedido.modal-seleccion-impresion.modal-planilla-selector {
    width: min(360px, calc(100vw - 32px));
    max-width: 360px;
    max-height: calc(100vh - 32px);
    padding: 12px;
    overflow: auto;
}

.modal-planilla-selector .modal-header {
    margin-bottom: 10px;
}

.modal-planilla-selector .bloque-form {
    padding: 12px;
}

.modal-planilla-selector .form-grid {
    grid-template-columns: 1fr;
}

.modal-planilla-selector input[type="number"] {
    width: 100%;
    padding: 9px 10px;
    font-size: 16px;
}

.modal-planilla-selector .acciones-planilla {
    justify-content: flex-end;
    margin-top: 10px;
}

.modal-planilla-vista {
    width: min(1100px, calc(100vw - 32px));
    height: min(760px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f4f7fb;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    padding: 10px;
}

.modal-planilla-vista-header {
    position: static;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.modal-planilla-vista-header h2 {
    max-width: calc(100% - 44px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planilla-frame-contenedor {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d7dde8;
    border-radius: 8px;
}

.planilla-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 760px) {
    .modal-pedido.modal-seleccion-impresion.modal-planilla-selector {
        width: min(340px, calc(100vw - 20px));
    }

    .modal-planilla-vista {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        padding: 8px;
    }
}


/* OPDS: VISTA PREVIA ANCHA INDEPENDIENTE */
.modal-opds-fondo.abierto {
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-opds-vista {
    box-sizing: border-box;
    width: min(1100px, calc(100vw - 32px));
    height: min(760px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f4f7fb;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    padding: 10px;
}

.modal-opds-vista-header {
    position: static;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.modal-opds-vista-header h2 {
    max-width: calc(100% - 44px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opds-frame-contenedor {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d7dde8;
    border-radius: 8px;
}

.opds-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 760px) {
    .modal-opds-vista {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        padding: 8px;
    }
}


.modal-planilla-vista-acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.btn-imprimir-planilla {
    min-width: 86px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #274ff2;
    color: #fff;
    font: 700 14px Arial, sans-serif;
    cursor: pointer;
}

.btn-imprimir-planilla:hover {
    filter: brightness(.94);
}
