/* Editor del logo de la empresa (ImagenEditor.razor + assets/js/LogoEditor.js), 24-nov-2026. */

/* Alto con hueco arriba: la X roja asoma 13 px por encima de la tarjeta y con 94vh quedaba cortada. */
.lge-modal.vac-modal { box-sizing: border-box; width: min(1060px, calc(100vw - 48px)); max-height: calc(100vh - 64px); margin-top: 16px; padding: 20px 22px 18px; }
.lge-cabecera { margin-bottom: 12px; }
.lge-titulo { font-size: 1.15rem; font-weight: 700; color: #1f2d3d; display: flex; align-items: center; gap: 8px; }
.lge-titulo i { color: #4088BD; }
.lge-subtitulo { font-size: .85rem; font-weight: 400; color: #667085; margin-top: 3px; }

.lge-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 20px; align-items: start; }

/* ---------- formatos ---------- */
.lge-formatos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.lge-formato {
    display: flex; align-items: center; gap: 10px; text-align: left;
    background: #fff; border: 1.5px solid #e3e8ef; border-radius: 12px; padding: 9px 11px;
    cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; color: #344054;
}
.lge-formato:hover:not(:disabled) { border-color: #9cc3e2; }
.lge-formato.activo { border-color: #4088BD; background: #f2f8fd; box-shadow: 0 0 0 3px rgba(64, 136, 189, .14); }
.lge-formato:disabled { opacity: .55; cursor: default; }
.lge-formato-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lge-formato-txt b { font-size: .84rem; }
.lge-formato-txt small { font-size: .72rem; color: #8a97a8; }
.lge-forma { flex: 0 0 auto; display: inline-block; border: 2px solid #4088BD; border-radius: 3px; background: rgba(64, 136, 189, .12); }
.lge-forma-libre { width: 30px; height: 18px; border-style: dashed; }

/* ---------- escenario (Cropper) ---------- */
.lge-escenario {
    position: relative; height: 340px; border-radius: 14px; overflow: hidden;
    border: 1px solid #e3e8ef;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #eef1f5 25%, transparent 25%), linear-gradient(-45deg, #eef1f5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef1f5 75%), linear-gradient(-45deg, transparent 75%, #eef1f5 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.lge-cropzona { position: absolute; inset: 0; }
.lge-img { display: block; max-width: 100%; }
.lge-escenario:not(.con-imagen) .lge-cropzona { visibility: hidden; }
.lge-escenario .cropper-container { width: 100% !important; height: 100% !important; }
.lge-escenario .cropper-view-box { outline: 2px solid #4088BD; outline-color: rgba(64, 136, 189, .95); }
.lge-escenario .cropper-line { background-color: #4088BD; }
.lge-escenario .cropper-point { background-color: #4088BD; width: 9px; height: 9px; opacity: 1; border-radius: 50%; }
.lge-escenario .cropper-modal { background-color: #1f2d3d; opacity: .38; }

.lge-soltar {
    position: absolute; inset: 14px; border: 2px dashed #b8cfe3; border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: rgba(255, 255, 255, .92); color: #475467; cursor: pointer; text-align: center; padding: 16px;
    transition: border-color .15s, background .15s;
}
.lge-soltar:hover, .lge-arrastrando .lge-soltar { border-color: #4088BD; background: #f2f8fd; }
.lge-soltar > i { font-size: 38px; color: #4088BD; margin-bottom: 4px; }
.lge-soltar b { font-size: 1.02rem; color: #1f2d3d; }
.lge-soltar small { font-size: .75rem; color: #8a97a8; margin-top: 6px; }
.lge-elegir { margin-top: 6px; pointer-events: none; }
.lge-arrastrando .lge-escenario { box-shadow: 0 0 0 3px rgba(64, 136, 189, .3); }

.lge-error {
    margin-top: 10px; background: #fff4f2; border: 1px solid #ffd2c9; color: #b42318;
    border-radius: 10px; padding: 9px 12px; font-size: .85rem; display: flex; gap: 8px; align-items: center;
}

/* ---------- herramientas ---------- */
.lge-herramientas { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.lge-grupo { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.round-button.lge-off { opacity: .45; pointer-events: none; }
.lge-pildora {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
    border-radius: 9px; border: 1px solid #dbe4ee; background: #fff; color: #35597a;
    font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
.lge-pildora:hover:not(:disabled) { background: #eef3f8; }
.lge-pildora.activo { background: #e7f6ec; border-color: #9fd9b2; color: #1e7b3e; }
.lge-pildora:disabled { opacity: .45; cursor: default; }
.lge-nota { margin: 10px 0 0; font-size: .78rem; color: #8a97a8; display: flex; gap: 7px; align-items: baseline; }

/* ---------- lado derecho ---------- */
.lge-lado { display: flex; flex-direction: column; gap: 12px; }
.lge-bloque { border: 1px solid #e6ebf2; border-radius: 14px; padding: 12px 14px; background: #fbfcfe; }
.lge-bloque-titulo {
    font-size: .78rem; font-weight: 700; color: #475467; text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.lge-bloque-titulo span { text-transform: none; color: #4088BD; }
.lge-margen-titulo { margin-top: 12px; margin-bottom: 4px; }
.lge-chips { display: flex; gap: 8px; }
.lge-chip {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px;
    border-radius: 9px; border: 1.5px solid #e3e8ef; background: #fff; color: #344054; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.lge-chip.activo { border-color: #4088BD; background: #f2f8fd; color: #1f5f8e; }
.lge-chip:disabled { opacity: .5; cursor: default; }
.lge-muestra { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #cfd8e3; display: inline-block; }
.lge-muestra-blanco { background: #fff; }
.lge-muestra-cuadros {
    background-color: #fff;
    background-image: linear-gradient(45deg, #d5dbe3 25%, transparent 25%, transparent 75%, #d5dbe3 75%),
                      linear-gradient(45deg, #d5dbe3 25%, transparent 25%, transparent 75%, #d5dbe3 75%);
    background-size: 8px 8px; background-position: 0 0, 4px 4px;
}
.lge-rango { width: 100%; accent-color: #4088BD; }
.lge-ver-hueco { font-size: .74rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: #667085; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; margin: 0; }

/* ---------- vista previa de la factura (escala 360 px = A4) ---------- */
.lge-factura {
    width: 360px; max-width: 100%; margin: 0 auto; background: #fff; border-radius: 6px; overflow: hidden;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .12); font-family: Lato, Arial, sans-serif; color: #111;
}
.lge-hueco { display: flex; align-items: flex-start; justify-content: flex-start; position: relative; }
.lge-hueco.derecha { justify-content: flex-end; margin-left: auto; }
.lge-hueco img { display: block; }
.lge-hueco img:not([data-ok]) { visibility: hidden; }
.hueco-visible .lge-hueco { outline: 1px dashed rgba(229, 57, 53, .55); outline-offset: 0; }

.lge-fac-clasica { display: flex; padding: 20px 20px 10px; gap: 0; }
.lge-fac-clasica.invertida, .lge-fac-mini.invertida, .lge-fac-franja.invertida { flex-direction: row-reverse; }
.lge-fac-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.lge-fac-qr { align-items: center; }
.lge-fac-qr span { width: 48px; height: 48px; background: repeating-linear-gradient(90deg, #d0d5dd 0 3px, #fff 3px 6px); border: 1px solid #d0d5dd; }
.lge-fac-clasica-titulo { align-items: flex-end; font-size: 6.5px; color: #667085; gap: 1px; }
.lge-fac-clasica.invertida .lge-fac-clasica-titulo { align-items: flex-start; }
.lge-fac-clasica-titulo b { font-size: 9.6px; color: #111; }

.lge-fac-franja { display: flex; background: var(--lge-color); color: var(--lge-texto-barra); padding: 14px 22px; gap: 10px; }
.lge-fac-empresa { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lge-fac-franja.invertida .lge-fac-empresa { align-items: flex-end; }
.lge-fac-nombre { font-size: 7.8px; font-weight: 700; }
.lge-fac-titulo { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font-size: 7px; }
.lge-fac-franja.invertida .lge-fac-titulo { align-items: flex-start; }
.lge-fac-titulo b { font-size: 14px; letter-spacing: .04em; }
.lge-caja-blanca { background: #fff; padding: 4px; display: inline-flex; }
.lge-caja-blanca.redonda { border-radius: 5px; }

.lge-fac-mini { display: flex; padding: 22px 27px 0; }
.lge-fac-mini-titulo { align-items: flex-end; color: var(--lge-titulos); font-size: 7px; }
.lge-fac-mini.invertida .lge-fac-mini-titulo { align-items: flex-start; }
.lge-fac-mini-titulo b { font-size: 18px; line-height: 1; }
.lge-fac-linea { height: 1px; background: #e4e7ec; margin: 9px 27px 0; }

.lge-fac-cuerpo { padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.lge-fac-cuerpo span { height: 6px; border-radius: 3px; background: #eef1f5; }
.lge-fac-cuerpo span.corta { width: 55%; }
.lge-pie-previa { text-align: center; font-size: .72rem; color: #8a97a8; margin-top: 8px; }


/* ---------- pie ---------- */
.lge-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f5; flex-wrap: wrap; }
.lge-pie-botones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
/* Mismo tamaño que el ItruckCardButton de al lado, en gris claro. */
.lge-btn-secundario {
    display: inline-flex; align-items: center; gap: 8px; margin: 4px 2px;
    padding: 8px 14px; border: 1px solid #dbe4ee; border-radius: 8px;
    background: #eef2f6; color: #35597a; cursor: pointer; white-space: nowrap;
    font-family: 'Poppins', sans-serif; font-size: .9rem; line-height: 1.2;
    transition: background .15s, color .15s, border-color .15s;
}
.lge-btn-secundario:hover:not(:disabled) { background: #e2eaf3; border-color: #c5d6e6; color: #1f5f8e; }
.lge-btn-secundario:disabled { opacity: .55; cursor: default; }
.lge-pie-botones .ItruckCardButton { white-space: nowrap; }

.lge-quitar { background: none; border: none; color: #d92d20; font-weight: 600; font-size: .84rem; cursor: pointer; padding: 6px 4px; display: inline-flex; gap: 6px; align-items: center; }
.lge-quitar:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .lge-grid { grid-template-columns: 1fr; }
    .lge-escenario { height: 280px; }
    .lge-formatos { grid-template-columns: 1fr; }
}

/* Fotos (Tipo="foto", 1-dic-2026): cómo queda en la ficha (cuadrado redondeado) y en la cabecera (círculo). */
.lge-fotos-previa { display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding: 18px 12px; border-radius: 12px; background: #f6f8fb; }
.lge-fotos-previa > span { display: grid; place-items: center; overflow: hidden; background: #e9edf3; border: 1px solid #d5dbe4; }
.lge-foto-grande { width: 150px; height: 150px; border-radius: 18px; }
.lge-foto-pequena { width: 44px; height: 44px; border-radius: 50%; }
.lge-fotos-previa img:not([data-ok]) { visibility: hidden; }
