/* Etiquetas SDPGO: estilos compartidos por el editor de plantillas y la vista de impresion.
   La geometria (posicion/tamano/fuente) llega inline desde LabelHtmlRenderer; aqui solo
   va la presentacion, de modo que editor e impresion se ven identicos. */

.sdpgo-label {
    position: relative;
    background: #fff;
    color: #0f172a;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

.sdpgo-label * { box-sizing: border-box; }

.sdpgo-label--design {
    outline: 1px solid rgba(196, 198, 207, .7);
    user-select: none;
    touch-action: none;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, .06) 1px, transparent 1px);
    background-size: 16px 16px;
}

.lbl-box {
    position: absolute;
    border: 1px solid #031f41;
    background: transparent;
    pointer-events: none;
}

.lbl-text {
    position: absolute;
    overflow: hidden;
    line-height: 1.1;
}

.sdpgo-label--design .lbl-text,
.sdpgo-label--design .lbl-qr { cursor: grab; }

.lbl-cap {
    font-weight: 700;
    letter-spacing: .04em;
    color: #031f41;
    text-transform: uppercase;
    line-height: 1.05;
}

.lbl-val {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.12;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lbl-text--hl .lbl-val { font-weight: 800; }

.lbl-qr { position: absolute; background: #fff; }
.lbl-qr svg { width: 100%; height: 100%; display: block; }

.lbl-barcode {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.lbl-barcode__bars { width: 100%; flex: 1 1 auto; min-height: 0; }
.lbl-barcode__bars svg { width: 100%; height: 100%; display: block; }

.lbl-barcode span { line-height: 1; color: #0f172a; }

.lbl-img { position: absolute; }
.lbl-img img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.sdpgo-label--design .lbl-img { cursor: grab; }

.label-preview-resize-handle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(135deg, transparent 0 30%, #1d3557 30% 40%, transparent 40% 55%, #1d3557 55% 65%, transparent 65% 100%);
    cursor: ew-resize;
    opacity: .85;
}
