/*
 * Archivo propiedad de Z-Bombilla Spain, S.L con cif B54689120
 *  Prohibido la utilizacion de este fichero salvo acuerdo legal.
 *
 * pedidosTemu.css — panel de pedidos de Temu en /pedidos
 * (WEB-INF/pedidos/temu/panelPedidosTemu.jsp y modalesPedidosTemu.jsp).
 *
 * Copia de pedidosTiktok.css con tk- → tm-, sin lo de 4PL de TikTok ni lo de la
 * factura de Finanzas (la etiqueta comprada a Temu tiene lo suyo al final,
 * tm-etq-* y tm-modal-ancho), y con estos renombres (ESPEC §5.7; pedidosTemuUI.js
 * usa exactamente los mismos nombres):
 *   tk-estado → tm-estado-pedido        tk-variante → tm-linea-variante
 *   tk-aviso → tm-aviso-pedido          tk-cargando → tm-pd-cargando
 *   tk-fila / tk-fila-cancelada / tk-linea-cancelada
 *            → tm-tr / tm-tr-cancelada / tm-linea-cancelada
 *   tk-link-pedido → tm-pedido          tk-logo-tiktok → tm-logo-temu
 *   tk-medidas-tiktok → tm-medidas-temu el resto tk-X → tm-X
 *
 * Prohibido aquí cualquier clase del panel de productos de Temu
 * (productosTemu.css, productosTemu*.js, WEB-INF/productos/temu/*; la lista
 * está en ESPEC §5.7 y en WAR_PATTERNS.md §7) y cualquiera de Amazon de
 * WAR_PATTERNS.md §7: por eso los renombres de arriba. Este fichero solo se
 * carga en /pedidos con Temu visible.
 *
 * Reutiliza, sin tocarlas, las genéricas de pedidos.css (stats-bar, stat-*,
 * estado-badge, productos-lista, producto-item, producto-img, agencia-*,
 * sortable-th, mirrored-wind y las animaciones del camión). Modo noche: capa 3
 * de assets/css/tema/temaOscuro.css, acotada bajo .tm-pedidos o [id^="tmModal"].
 */

/* ── Panel ───────────────────────────────────────────────────── */
#zbpContenidoTemu.tm-pedidos {
    padding: 20px 0 60px;
    font-family: inherit;
    color: inherit;
}
/* Bootstrap 5 no trae .min-w-0: sin esto el bloque del pedido (casilla +
   bandera + número + estado) no encoge y se sale de la celda entre 992 y
   ~1200 px. Acotado al panel y a los modales de Temu para no cambiar Amazon. */
#zbpContenidoTemu.tm-pedidos .min-w-0,
[id^="tmModal"] .min-w-0 {
    min-width: 0;
}

/* ── Tabla ───────────────────────────────────────────────────── */
.tm-tabla {
    table-layout: fixed;
    width: 100%;
}
.tm-tabla thead th {
    font-size: .71rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
}
.tm-tabla thead th:first-child {
    text-align: left;
}
.tm-tabla td {
    padding-top: .6rem;
    padding-bottom: .6rem;
    vertical-align: top;
    word-break: break-word;
}
.tm-tr-cancelada {
    opacity: .65;
}

/* ── Columna pedido ─────────────────────────────────────────── */
.tm-logo-temu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #FB7701;
    color: #fff;
    font: 700 .66rem/1 Arial, sans-serif;
    margin-right: 4px;
    flex-shrink: 0;
}
.tm-bandera {
    width: 16px;
    height: 12px;
    vertical-align: middle;
    border-radius: 2px;
    margin-right: 3px;
    flex-shrink: 0;
}
.tm-pais-cod {
    font-size: .7rem;
    color: var(--bs-secondary-color);
    margin-right: 4px;
    text-transform: uppercase;
}
.tm-pedido {
    color: #0d6efd;
    text-decoration: none;
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}
a.tm-pedido:hover {
    color: #0a58ca;
    text-decoration: underline;
}
.tm-copiar i {
    font-size: .78rem;
}
.tm-tabla .tm-id-linea .tm-copiar {
    opacity: 0;
    transition: opacity .15s;
}
.tm-tabla td:hover .tm-id-linea .tm-copiar,
.tm-tabla .tm-id-linea .tm-copiar:focus-visible {
    opacity: 1;
}
.tm-fecha {
    font-size: .71rem;
    font-weight: 500;
    margin-top: .2rem;
}
.tm-estado-pedido {
    margin-top: .25rem;
    max-width: 100%;
    white-space: normal;
}
.tm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.tm-chip {
    font-size: .56rem;
    font-weight: 600;
    white-space: normal;
    text-align: left;
}
/* «Vence pronto» (naranja). «Fuera de plazo»: tm-chip-plazo + tm-sla-rojo. */
.tm-chip-plazo    { background: #e58f1e; color: #fff; }
.tm-chip-plazo.tm-sla-rojo    { background: #dc3545; color: #fff; }
.tm-chip-plazo.tm-sla-naranja { background: #e58f1e; color: #fff; }
.tm-chip-cancel   { background: #ffc107; color: #212529; }
.tm-chip-aviso    { background: #ffe5d0; color: #842029; }
.tm-chip-firma    { background: #e0cffc; color: #3d0a91; }
.tm-chip-sugerido { background: #fff3cd; color: #664d03; }
.tm-chip-info,
.tm-chip-otro     { background: #e9ecef; color: #495057; }
.tm-alertas {
    list-style: none;
    padding: 0;
    margin: .3rem 0 0;
    font-size: .64rem;
    line-height: 1.3;
    color: #8a5300;
}
.tm-alertas li + li {
    margin-top: 2px;
}

/* ── Destinatario ───────────────────────────────────────────── */
.tm-dest-nombre {
    font-size: .82rem;
    line-height: 1.3;
}
.tm-dest-lugar {
    font-size: .73rem;
}
.tm-btn-obs {
    font-size: .68rem;
    padding: .2rem .5rem;
    line-height: 1.3;
}
.tm-obs-vista {
    font-size: .6rem;
    font-style: italic;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.tm-obs-propia      { color: #0d6efd; }
.tm-obs-predefinida { color: #6f42c1; }
.tm-chip-grupo {
    color: #fff;
    font-size: .57rem;
    font-weight: 600;
    white-space: normal;
}

/* ── Productos ──────────────────────────────────────────────── */
.tm-cant {
    font-size: .58rem;
    margin-top: 3px;
}
.tm-prod-titulo {
    font-size: .79rem;
    font-weight: 600;
    line-height: 1.35;
}
.tm-prod-meta {
    font-size: .63rem;
    margin-top: 1px;
}
.tm-linea-variante {
    color: #495057;
}
.tm-sku {
    font-weight: 500;
}
.tm-prod-skuid {
    font-size: .6rem;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}
.tm-prod-precio {
    font-size: .71rem;
    min-width: 70px;
}
/* Línea con variante (pedidosTemuUI.js htmlCabeceraLinea y el modal de
   medidas): lo principal es la variante (lo que hay que coger) con el SKU
   del vendedor; el título del anuncio, igual para todas sus variantes, va
   debajo, pequeño y atenuado, en una sola línea (entero en title=). Solo
   variables de Bootstrap 5.3: el modo noche sale sin tocar temaOscuro.css. */
.tm-prod-principal {
    font-size: .8rem;
    line-height: 1.35;
    word-break: break-word;
}
.tm-var-valores {
    font-weight: 700;
    color: var(--bs-emphasis-color);
}
.tm-var-sep {
    font-weight: 400;
    color: var(--bs-secondary-color);
}
.tm-prod-sku {
    display: inline-block;
    max-width: 100%;
    font-size: .64rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0 4px;
    border: 1px solid var(--bs-border-color);
    border-radius: 3px;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    vertical-align: 1px;
    overflow-wrap: anywhere;
}
.tm-prod-sku-falta {
    font-weight: 400;
    color: var(--bs-secondary-color);
    background: transparent;
}
.tm-prod-anuncio {
    font-size: .63rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
/* En el modal de medidas el resto del texto va a .875em: que la variante no
   quede más pequeña que él, ni el anuncio ilegible. */
[id^="tmModal"] .tm-prod-principal {
    font-size: .9rem;
}
[id^="tmModal"] .tm-prod-anuncio {
    font-size: .75rem;
}
.tm-linea-cancelada .tm-prod-titulo,
.tm-linea-cancelada .tm-prod-principal,
.tm-linea-cancelada .tm-prod-precio {
    text-decoration: line-through;
    opacity: .6;
}
.tm-linea-cancelada .tm-prod-anuncio {
    opacity: .6;
}
.tm-prod-pie {
    font-size: .71rem;
}
.tm-total {
    font-size: .76rem;
}
/* Importes (02/11/2026): lo que pagó el cliente, lo que recibes de Temu y su desglose. */
.tm-pedidos .tm-imp-cliente {
    color: #6c757d;
}
.tm-pedidos .tm-imp-recibiras {
    font-size: .76rem;
    color: #146c43;
}
.tm-pedidos .tm-btn-imp-desglose {
    font-size: .66rem;
    line-height: 1.2;
    text-decoration: none;
}
.tm-pedidos .tm-btn-imp-desglose .bi {
    font-size: .6rem;
}
.tm-pedidos .tm-desglose {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .35rem .9rem;
    padding: .35rem .5rem;
    border-radius: 4px;
    background: rgba(13, 110, 253, .04);
    border: 1px solid rgba(13, 110, 253, .12);
    font-size: .68rem;
}
.tm-pedidos .tm-desglose-bloque > div:not(.tm-desglose-titulo) {
    padding: .12rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.tm-pedidos .tm-desglose-bloque > div:last-child {
    border-bottom: 0;
}
.tm-pedidos .tm-desglose-titulo {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: .6rem;
    color: #6c757d;
    margin-bottom: .1rem;
}
.tm-pedidos .tm-desglose-sub {
    color: #6c757d;
    font-style: italic;
}
.tm-pedidos .tm-desglose-total {
    border-top: 1px solid rgba(0, 0, 0, .2);
    /* Tapa la línea gris de la fila de encima: una sola raya, más marcada. */
    margin-top: -1px;
    padding-top: .2rem;
}
[data-bs-theme="dark"] .tm-pedidos .tm-imp-recibiras {
    color: #75b798;
}
[data-bs-theme="dark"] .tm-pedidos .tm-desglose {
    background: rgba(110, 168, 254, .07);
    border-color: rgba(110, 168, 254, .2);
}
[data-bs-theme="dark"] .tm-pedidos .tm-desglose-total {
    border-top-color: rgba(255, 255, 255, .15);
}
[data-bs-theme="dark"] .tm-pedidos .tm-desglose-bloque > div:not(.tm-desglose-titulo) {
    border-bottom-color: rgba(255, 255, 255, .08);
}
.tm-medidas {
    font-size: .6rem;
    border-radius: 3px;
    padding: 0 4px;
    white-space: nowrap;
}
.tm-medidas-propio { background: #e7f1ff; color: #084298; }
.tm-medidas-temu   { background: #fff0e3; color: #8a4100; }
.tm-medidas-falta  { background: #f8d7da; color: #842029; }
.tm-btn-medidas {
    font-size: .62rem;
    line-height: 1;
    color: #6c757d;
}
.tm-btn-anadir-medidas {
    font-size: .6rem;
    padding: 1px 6px;
    line-height: 1.4;
    border-radius: 3px;
    color: #fff;
}
.tm-btn-releer {
    font-size: .65rem;
    display: block;
    margin-bottom: 2px;
}

/* ── Plazos ─────────────────────────────────────────────────── */
.tm-plazos {
    font-size: .72rem;
}
.tm-plazo {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
    white-space: nowrap;
}
.tm-plazo-et {
    font-size: .55rem;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 3px;
    background: #e9ecef;
    color: #495057;
    min-width: 28px;
    text-align: center;
}
.tm-pedidos .tm-plazo-cuenta {
    line-height: 1.2;
}
.tm-pedidos .tm-plazo-dia {
    font-size: .68rem;
}
/* La etiqueta «ENV» arriba, junto a la cuenta atrás (no centrada entre las dos líneas). */
.tm-pedidos .tm-plazo-arriba {
    align-items: flex-start;
}
.tm-sla-verde   { background: #1f8a1f; color: #fff; }
.tm-sla-naranja { background: #e58f1e; color: #fff; }
.tm-sla-rojo    { background: #dc3545; color: #fff; }
.tm-plazo-espera {
    color: #8a5300;
    font-weight: 600;
    white-space: normal;
}

/* ── Agencia ────────────────────────────────────────────────── */
.tm-combinado {
    font-size: .62rem;
    color: #0aa8c7;
}
.tm-bultos {
    font-size: .6rem;
    color: #adb5bd;
}
.tm-aviso-agencia {
    font-size: .63rem;
    color: #b02a37;
    line-height: 1.3;
    margin-top: 2px;
}
.tm-calculando {
    font-size: .7rem;
    color: #6c757d;
}
.tm-seg-texto {
    font-size: .67rem;
    margin-top: 3px;
    word-break: break-all;
}
.tm-conf {
    font-size: .62rem;
    line-height: 1.3;
    margin-top: 3px;
}
.tm-conf-ok      { color: #157347; }
.tm-conf-omitido { color: #6c757d; }
.tm-conf-error   { color: #b02a37; }
.tm-btn-agencia,
.tm-btn-seguimiento {
    font-size: .65rem;
}
.tm-btn-seguimiento {
    line-height: 1.3;
    word-break: break-all;
}

/* ── Acciones ───────────────────────────────────────────────── */
.tm-acciones {
    min-width: 0;
}
.tm-acciones .btn {
    font-size: .7rem;
}

/* ── Aviso de combinaciones ─────────────────────────────────── */
.tm-alerta-grupos {
    font-size: .8rem;
}
.tm-grupos-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tm-grupo-linea {
    border-left: 4px solid #dee2e6;
    border-radius: .35rem;
    padding: .35rem .5rem;
    background: rgba(255, 255, 255, .5);
}
.tm-grupo-tipo {
    font-weight: 600;
    font-size: .74rem;
}
.tm-grupo-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}
.tm-grupo-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .64rem;
    background: rgba(255, 255, 255, .85);
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    padding: 0 6px;
    color: #212529;
}
.tm-grupo-chip-principal {
    border-color: #212529;
    font-weight: 700;
}
.tm-grupo-chip-fuera {
    text-decoration: line-through;
    opacity: .55;
}
.tm-grupo-quitar {
    border: 0;
    background: transparent;
    color: #b02a37;
    font-size: .85rem;
    line-height: 1;
    padding: 0 0 0 2px;
    cursor: pointer;
}
.tm-grupo-quitar:hover,
.tm-grupo-quitar:focus-visible {
    color: #dc3545;
}

/* ── Tarjetas (< 992 px) ────────────────────────────────────── */
.tm-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #dee2e6;
    border-radius: .5rem;
    margin-bottom: .65rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
    overflow: hidden;
}
.tm-card-cabecera {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: .55rem .8rem;
}
.tm-card-cabecera .estado-badge {
    display: inline-block;
    width: auto;
    margin-top: 0;
    padding: .2rem .5rem;
}
.tm-card-cuerpo {
    display: grid;
    grid-template-columns: 44% 56%;
    align-items: start;
}
.tm-card-col:first-child {
    border-right: 1px solid #f0f0f0;
}
.tm-card-seccion {
    padding: .5rem .8rem;
    border-bottom: 1px solid #f2f2f2;
    font-size: .82rem;
    min-width: 0;
}
.tm-card-seccion:last-child {
    border-bottom: none;
    padding-bottom: .7rem;
}
.tm-card-etiqueta {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #adb5bd;
    font-weight: 700;
    margin-bottom: .28rem;
}
.tm-card-acciones .btn {
    width: 100%;
}
.tm-card .productos-lista {
    max-width: none;
}
@media (max-width: 575.98px) {
    .tm-card-cuerpo {
        grid-template-columns: 1fr;
    }
    .tm-card-col:first-child {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* ── Camión de carga ────────────────────────────────────────── */
.tm-pd-cargando {
    height: 46px;
}
.tm-camion {
    left: -120px;
    top: 8px;
    color: #0d6efd;
}
.tm-camion .bi-wind {
    font-size: 1.3rem;
}
.tm-camion .bi-truck {
    font-size: 2rem;
}
.tm-camion.animating {
    animation: tmPdMoverCamion 5s linear infinite;
}
@keyframes tmPdMoverCamion {
    0%   { left: -120px; }
    100% { left: 105%; }
}

/* ── Avisos flotantes ───────────────────────────────────────── */
.tm-toasts {
    position: fixed;
    right: 16px;
    bottom: 64px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    pointer-events: none;
}
.tm-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: .6rem .75rem;
    border-radius: .5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    font-size: .8rem;
    line-height: 1.35;
    background: #fff;
    color: #212529;
    border-left: 4px solid #0d6efd;
}
.tm-toast-texto {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}
.tm-toast-ok    { border-left-color: #198754; }
.tm-toast-ok .bi    { color: #198754; }
.tm-toast-info  { border-left-color: #0d6efd; }
.tm-toast-info .bi  { color: #0d6efd; }
.tm-toast-aviso { border-left-color: #e6a817; }
.tm-toast-aviso .bi { color: #e6a817; }
.tm-toast-error { border-left-color: #dc3545; }
.tm-toast-error .bi { color: #dc3545; }
@media (max-width: 575.98px) {
    .tm-toasts {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* ── Cabecera de filtros, selectores y avisos ───────────────── */
.tm-cabecera-tienda {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    color: #FB7701;
    font-weight: 600;
}
.tm-sel-cuenta + .select2-container {
    width: 100% !important;
}
.tm-sel-cuenta + .select2-container .select2-selection--single {
    height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    font-size: .875rem;
}
.tm-sel-cuenta + .select2-container .select2-selection__rendered {
    padding-left: 0;
    line-height: 1.5;
    color: #212529;
}
.tm-sel-cuenta + .select2-container .select2-selection__arrow {
    height: calc(1.5em + .5rem + 2px);
}
.tm-aviso-pedido {
    font-size: .82rem;
}
.tm-detalle-admin summary {
    cursor: pointer;
    color: #6c757d;
}

/* ── Modales ────────────────────────────────────────────────── */
.tm-obs-original {
    font-size: .62rem;
    color: #6c757d;
}
.tm-obs-pred {
    background: #f8f9fa;
}
.tm-obs-pred-texto {
    white-space: pre-wrap;
}
.tm-obs-pred-nota {
    font-size: .62rem;
}
.tm-agencia-lista {
    font-size: .8rem;
}
.tm-agencia-lista .list-group-item.active .text-danger {
    color: #fff !important;
}
/* No disponibles: recuadro compacto con scroll, debajo de las que se pueden
   elegir. Variables de Bootstrap: vale igual en modo noche. */
.tm-agencias-nodisp-titulo {
    font-size: .72rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .25rem;
}
.tm-agencias-nodisp-lista {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background: var(--bs-tertiary-bg);
}
.tm-agencias-nodisp-item {
    padding: .3rem .55rem;
    font-size: .72rem;
    line-height: 1.25;
    color: var(--bs-secondary-color);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}
.tm-agencias-nodisp-item:last-child {
    border-bottom: 0;
}
.tm-agencias-nodisp-motivo {
    display: block;
    color: var(--bs-danger-text-emphasis);
}
/* Facturas de Temu (#tmModalFacturas): un botón por factura. */
.tm-fac-abrir {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    font-size: .8rem;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}
.tm-fac-abrir:last-child {
    margin-bottom: 0;
}

/* ── Etiqueta comprada a Temu (ESPEC_ETIQUETA_TEMU §3.12, §9.4.4) ─────────
   Solo con la cuenta activada (el JS no pinta nada de esto si no). Acotado
   bajo .tm-pedidos (panel) y [id^="tmModal"] (modales): el panel de
   productos de Temu usa el mismo prefijo tm-. Fondos y bordes con variables
   de Bootstrap: el modo noche sale sin tocar temaOscuro.css. El naranja de
   Temu (#FB7701) con letra blanca se lee igual en los dos modos. */
.tm-pedidos .tm-etq-badge,
[id^="tmModal"] .tm-etq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    background: #FB7701;
    color: #fff;
    font: 700 .62rem/1 Arial, sans-serif;
    vertical-align: -2px;
    flex-shrink: 0;
}
.tm-pedidos .tm-etq-badge-zb,
[id^="tmModal"] .tm-etq-badge-zb {
    display: inline-block;
    font-size: .58rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 5px;
    border-radius: 3px;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    vertical-align: 1px;
}
.tm-pedidos .tm-etq-mas-barata,
[id^="tmModal"] .tm-etq-mas-barata {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
    border: 1px solid var(--bs-success-border-subtle);
    font-size: .55rem;
    font-weight: 600;
}
.tm-pedidos .tm-etq-elegida-badge,
[id^="tmModal"] .tm-etq-elegida-badge {
    background: #FB7701;
    color: #fff;
    font-size: .55rem;
    font-weight: 600;
}
.tm-pedidos .tm-etq-estimado,
[id^="tmModal"] .tm-etq-estimado {
    font-size: .6rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

/* Columna «Agencia» del panel */
.tm-pedidos .tm-etq-desde {
    display: block;
    font-size: .65rem;
    line-height: 1.35;
    margin-top: 3px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    white-space: normal;
}
.tm-pedidos .tm-etq-desde:hover,
.tm-pedidos .tm-etq-desde:focus-visible {
    color: var(--bs-emphasis-color);
    text-decoration: underline;
}
.tm-pedidos .tm-etq-desde.tm-etq-desde-barata {
    color: var(--bs-success-text-emphasis);
    font-weight: 600;
}
.tm-pedidos .tm-etq-solo {
    font-size: .7rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.tm-pedidos .tm-etq-eleccion {
    font-size: .72rem;
    line-height: 1.35;
    padding: .3rem .45rem;
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid #FB7701;
    border-radius: .35rem;
    background: var(--bs-tertiary-bg);
}
.tm-pedidos .tm-etq-eleccion.tm-etq-caducada {
    border-left-color: var(--bs-secondary-color);
    color: var(--bs-secondary-color);
    opacity: .85;
}
.tm-pedidos .tm-etq-caducada .tm-etq-badge {
    background: var(--bs-secondary-color);
}
.tm-pedidos .tm-etq-motivo {
    font-size: .63rem;
    color: var(--bs-danger-text-emphasis);
    margin-top: 2px;
}
.tm-pedidos .tm-etq-entrega {
    font-size: .63rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
    margin-top: 2px;
}
.tm-pedidos .tm-etq-nota {
    font-size: .6rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
    margin-top: 2px;
}
.tm-pedidos .tm-etq-fallida {
    font-size: .64rem;
    line-height: 1.3;
    padding: .25rem .4rem;
    margin-top: 3px;
    border: 1px solid var(--bs-danger-border-subtle);
    border-radius: .3rem;
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}
/* Interruptor del admin (#tmPdAjusteEtq) */
.tm-pedidos .tm-etq-ajuste {
    padding: .4rem .75rem;
    border: 1px solid var(--bs-border-color);
    border-left: 4px solid #FB7701;
    border-radius: .375rem;
    background: var(--bs-body-bg);
}

/* Modal «Elegir cómo enviarlo» (#tmModalAgencia) */
#tmModalAgencia.tm-modal-ancho .modal-dialog {
    /* !important: el JSP le pone max-width:480px en línea y no se toca (§9.4.4) */
    max-width: 560px !important;
}
#tmModalAgencia #tmAgenciaNota {
    flex: 1 1 100%;
    font-size: .7rem;
    line-height: 1.35;
}
[id^="tmModal"] .tm-etq-bloque {
    margin-bottom: .6rem;
}
[id^="tmModal"] .tm-etq-bloque-titulo {
    font-size: .74rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
[id^="tmModal"] .tm-etq-item {
    font-size: .8rem;
}
[id^="tmModal"] .tm-etq-item.tm-etq-elegida {
    background: var(--bs-warning-bg-subtle);
    border-left: 3px solid #FB7701;
}
[id^="tmModal"] .tm-etq-opcion {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
[id^="tmModal"] .tm-etq-opcion:disabled {
    cursor: default;
}
[id^="tmModal"] .tm-etq-opcion:focus-visible {
    outline: 2px solid #FB7701;
    outline-offset: 2px;
    border-radius: .25rem;
}
[id^="tmModal"] .tm-etq-condiciones {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
}
[id^="tmModal"] .tm-etq-condicion {
    font-size: .58rem;
    line-height: 1.4;
    padding: 0 5px;
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
[id^="tmModal"] .tm-etq-reglas {
    font-size: .65rem;
    margin-top: 3px;
    color: var(--bs-secondary-color);
}
/* «Bloquear este transportista» / «No se elige sola» debajo de cada opción de Temu */
[id^="tmModal"] .tm-etq-bloqueo {
    font-size: .68rem;
    margin-top: 3px;
    color: var(--bs-secondary-color);
}
[id^="tmModal"] .tm-etq-bloqueo .tm-etq-bloquear {
    font-size: inherit;
    color: var(--bs-secondary-color);
    text-decoration: none;
}
[id^="tmModal"] .tm-etq-bloqueo .tm-etq-bloquear:hover:not(:disabled) {
    color: var(--bs-danger-text-emphasis);
    text-decoration: underline;
}
.tm-etq-bloqueada {
    font-size: .6rem;
    font-weight: 600;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px dashed var(--bs-border-color);
}
[id^="tmModal"] .tm-etq-reglas summary {
    cursor: pointer;
}
[id^="tmModal"] .tm-etq-reglas-texto {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-top: 2px;
}
[id^="tmModal"] .tm-etq-franjas {
    margin-top: .4rem;
    padding: .4rem .6rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .375rem;
    background: var(--bs-tertiary-bg);
    max-height: 210px;
    overflow-y: auto;
}
[id^="tmModal"] .tm-etq-caja {
    font-size: .68rem;
    margin: .25rem 0 .4rem;
}
/* Enlaces pequeños de la etiqueta de Temu (como «Cambiar agencia»). */
.tm-pedidos .btn-link.tm-btn-etq-opciones,
[id^="tmModal"] .tm-etq-refrescar {
    font-size: .65rem;
}

/* ── PrestaShop (módulo temuzb, 21/10/2026, contrato §5.2) ─────────────────
   Desplegable «Opciones» de la cabecera de los filtros (pedidosTemuOpciones.js),
   insignia de la ligadura de cada línea (PS #id, Sin ligar, Otra tienda), botón
   «Ligar» (tm-btn-ligar-linea), chips del paso a PrestaShop de cada pedido y
   «Reintentar» (tm-btn-ps-reintentar). Solo tm-pd-ps-*, acotado bajo
   .tm-pedidos: ninguna clase del panel de productos de Temu (tm-ps-*) ni de
   Amazon. Fondos de los chips con variables de Bootstrap 5.3 (el modo noche
   sale sin tocar temaOscuro.css); las insignias, verde y rojo con su versión
   clara en modo noche aquí mismo. */
.tm-pedidos .tm-pd-opciones {
    width: 360px;
    max-width: 92vw;
}
.tm-pedidos .tm-pd-opciones .form-check-label {
    font-size: .82rem;
}
.tm-pedidos .tm-pd-ps-badge {
    display: inline-block;
    font-size: .72rem;
    line-height: 1.35;
    border: 1px solid #198754;
    color: #198754;
    border-radius: .25rem;
    padding: 0 .3rem;
    white-space: nowrap;
}
.tm-pedidos .tm-pd-ps-badge.tm-pd-ps-sin {
    border-color: #dc3545;
    color: #dc3545;
}
.tm-pedidos .tm-pd-ps-badge.tm-pd-ps-otra {
    border-color: #e58f1e;
    color: #b35c00;
}
.tm-pedidos .tm-pd-ps-badge.tm-pd-ps-id {
    border-color: #0d6efd;
    color: #0d6efd;
}
[data-bs-theme="dark"] .tm-pedidos .tm-pd-ps-badge {
    border-color: #75b798;
    color: #75b798;
}
[data-bs-theme="dark"] .tm-pedidos .tm-pd-ps-badge.tm-pd-ps-sin {
    border-color: #ea868f;
    color: #ea868f;
}
[data-bs-theme="dark"] .tm-pedidos .tm-pd-ps-badge.tm-pd-ps-otra {
    border-color: #ffda6a;
    color: #ffda6a;
}
[data-bs-theme="dark"] .tm-pedidos .tm-pd-ps-badge.tm-pd-ps-id {
    border-color: #6ea8fe;
    color: #6ea8fe;
}
.tm-pedidos .btn-sm.tm-btn-ligar-linea {
    font-size: .68rem;
    line-height: 1.3;
    padding: .05rem .4rem;
}
/* Misma base que tm-chip-info (gris), con variables de Bootstrap. */
.tm-pedidos .tm-pd-ps-chip {
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
}
.tm-pedidos .tm-pd-ps-chip.tm-pd-ps-chip-ok {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}
.tm-pedidos .tm-pd-ps-chip.tm-pd-ps-chip-aviso {
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}
.tm-pedidos .tm-pd-ps-chip.tm-pd-ps-chip-error {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}
.tm-pedidos .btn-link.tm-btn-ps-reintentar,
.tm-pedidos .btn-link.tm-btn-ps-reponer {
    font-size: .62rem;
    line-height: 1.3;
}
