/* DSU RMA · cliente (y formulario en el panel). Colores neutros: hereda texto y fondo del tema. */
.dsu-rma-app, .dsu-rma-arts, .dsu-rma-linea { --rma-ac: var(--dsu-rma-acento, var(--wp--preset--color--primary, #c61717)); --rma-ln: color-mix(in srgb, currentColor 18%, transparent); --rma-bg: color-mix(in srgb, currentColor 5%, transparent); --rma-mu: color-mix(in srgb, currentColor 65%, transparent); }
.dsu-rma-app { container-type: inline-size; }
.dsu-rma-app *, .dsu-rma-app *::before { box-sizing: border-box; }
.dsu-rma-app h3 { font-size: 1rem; margin: 1.4em 0 .6em; }
.dsu-rma-app h3:first-child { margin-top: 0; }
.dsu-rma-app input[type=text], .dsu-rma-app input[type=tel], .dsu-rma-app input[type=email], .dsu-rma-app input[type=search], .dsu-rma-app select, .dsu-rma-app textarea { width: 100%; padding: .55em .7em; border: 1px solid var(--rma-ln); border-radius: 6px; background: transparent; color: inherit; font: inherit; }
.dsu-rma-app select option { color: #111; }

.dsu-rma-pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; }
.dsu-rma-pasos .p { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rma-ln); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.dsu-rma-pasos .p span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rma-bg); font-weight: 700; flex: none; }
.dsu-rma-pasos .p.act { border-color: var(--rma-ac); }
.dsu-rma-pasos .p.act span, .dsu-rma-pasos .p.ok span { background: var(--rma-ac); color: #fff; }
.dsu-rma-pasos .p:disabled { opacity: .55; cursor: default; }

.dsu-rma-cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.dsu-rma-resumen { position: sticky; top: 90px; border: 1px solid var(--rma-ln); border-radius: 10px; padding: 14px 16px; background: var(--rma-bg); font-size: .9rem; }
.dsu-rma-resumen h3 { margin: 0 0 8px; }
.dsu-rma-resumen dl { margin: 0; }
.dsu-rma-resumen dt { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rma-mu); margin-top: 10px; }
.dsu-rma-resumen dd { margin: 2px 0 0; word-break: break-word; }

.dsu-rma-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.dsu-rma-tipo, .dsu-rma-opciones .op { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--rma-ln); border-radius: 10px; cursor: pointer; position: relative; }
.dsu-rma-tipo input, .dsu-rma-opciones .op input, .dsu-rma-chips label.chip input { position: absolute; opacity: 0; pointer-events: none; }
.dsu-rma-tipo small, .dsu-rma-opciones small { color: var(--rma-mu); }
.dsu-rma-tipo.sel, .dsu-rma-opciones .op.sel { border-color: var(--rma-ac); box-shadow: inset 0 0 0 1px var(--rma-ac); }
.dsu-rma-tipo:focus-within, .dsu-rma-opciones .op:focus-within, .dsu-rma-chips .chip:focus-within { outline: 2px solid var(--rma-ac); outline-offset: 2px; }
.dsu-rma-opciones { display: grid; gap: 8px; margin: 10px 0; }
.dsu-rma-opciones .op span { display: flex; flex-direction: column; }

.dsu-rma-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.dsu-rma-campos label, .dsu-rma-bloque { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.dsu-rma-campos .ancho { grid-column: 1 / -1; }
.dsu-rma-bloque { margin: 10px 0; }

.dsu-rma-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dsu-rma-chips .chip { position: relative; padding: 5px 12px; border: 1px solid var(--rma-ln); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .82rem; cursor: pointer; }
.dsu-rma-chips .chip.sel { background: var(--rma-ac); border-color: var(--rma-ac); color: #fff; }

.dsu-rma-buscar { display: flex; gap: 8px; }
.dsu-rma-buscar select { width: auto; flex: none; }
.dsu-rma-buscar input { flex: 1; min-width: 0; }
.dsu-rma-buscar .button { flex: none; }
.dsu-rma-compra { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rma-ln); }
.dsu-rma-compra img, .dsu-rma-compra .sinimg { width: 52px; height: 52px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.dsu-rma-compra .t, .dsu-rma-sel .t { flex: 1; min-width: 0; }
.dsu-rma-compra small, .dsu-rma-sel small, .dsu-rma-rev small { display: block; color: var(--rma-mu); font-size: .8rem; }
.dsu-rma-sel { display: grid; gap: 8px; }
.dsu-rma-sel .it { position: relative; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 10px 34px 10px 12px; border: 1px solid var(--rma-ac); border-radius: 8px; }
.dsu-rma-sel .it .t { flex: 1 1 100%; }
.dsu-rma-sel label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; flex: 1 1 140px; }
.dsu-rma-sel .serie { font-size: .85rem; }
.dsu-rma-quitar { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 4px; }

.dsu-rma-det { padding: 14px 0; border-bottom: 1px solid var(--rma-ln); }
.dsu-rma-det h3 small { font-weight: 400; color: var(--rma-mu); }
.dsu-rma-det .lbl { font-size: .85rem; margin: 10px 0 4px; }
.dsu-rma-det .cont { color: var(--rma-mu); }
.dsu-rma-det .cont.ok { color: #1e7e34; }
.dsu-rma-evid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dsu-rma-evid .ev, .dsu-rma-evid a { position: relative; width: 84px; height: 84px; border: 1px dashed var(--rma-ln); border-radius: 8px; display: grid; place-items: center; overflow: hidden; font-size: .75rem; text-align: center; color: inherit; }
.dsu-rma-evid img { width: 100%; height: 100%; object-fit: cover; }
.dsu-rma-evid em, .dsu-rma-evid a span { padding: 4px; word-break: break-all; }
.dsu-rma-evid .ev button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; }
.dsu-rma-evid .mas { cursor: pointer; }
.dsu-rma-evid .mas input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.dsu-rma-rev > div { padding: 10px 0; border-bottom: 1px solid var(--rma-ln); }
.dsu-rma-rev p { margin: 4px 0; }
.dsu-rma-politica { font-size: .85rem; padding: 10px 12px; background: var(--rma-bg); border-radius: 8px; margin: 12px 0; }
.dsu-rma-acepto { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; }
.dsu-rma-nota { color: var(--rma-mu); font-size: .88rem; }
.dsu-rma-err { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid #d63638; background: rgba(214,54,56,.08); }
.dsu-rma-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.dsu-rma-link { border: 0; background: none; padding: 0; color: var(--rma-ac, inherit); text-decoration: underline; cursor: pointer; font: inherit; }

.dsu-rma-listo { text-align: center; padding: 30px 16px; border: 1px solid var(--rma-ln); border-radius: 12px; }
.dsu-rma-listo .folio { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; letter-spacing: .06em; border: 3px solid currentColor; display: inline-block; padding: 8px 22px; margin: 6px 0; }
.dsu-rma-listo .caja { font-weight: 700; }

/* Lista y detalle */
.dsu-rma-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dsu-rma-cab p { margin: 0; }
.dsu-rma-estado { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(120,120,120,.15); white-space: nowrap; }
.dsu-rma-estado.e-solicitada, .dsu-rma-estado.e-en_transito { background: #fcf0d6; color: #7a4f00; }
.dsu-rma-estado.e-autorizada { background: #e5f0fa; color: #135e96; }
.dsu-rma-estado.e-recibida, .dsu-rma-estado.e-diagnostico, .dsu-rma-estado.e-con_proveedor { background: #ede7f6; color: #4527a0; }
.dsu-rma-estado.e-resuelta, .dsu-rma-estado.e-enviada { background: #e7f5ea; color: #1e6b32; }
.dsu-rma-estado.e-cerrada { background: #1e6b32; color: #fff; }
.dsu-rma-estado.e-rechazada, .dsu-rma-estado.e-cancelada { background: #fbeaea; color: #8a2424; }
.dsu-rma-det-cab { margin-bottom: 14px; }
.dsu-rma-folio { font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; margin-right: 8px; }
.dsu-rma-sub { color: var(--rma-mu, inherit); opacity: .8; }
.dsu-rma-aviso, .dsu-rma-envio { padding: 12px 16px; border-radius: 10px; background: rgba(120,120,120,.08); margin: 12px 0; }
.dsu-rma-envio h3 { margin-top: 0; }
.dsu-rma-guia { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 10px 0 18px; }
.dsu-rma-guia label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; }
.dsu-rma-arts { display: grid; gap: 10px; }
.dsu-rma-art { padding: 12px 14px; border: 1px solid var(--rma-ln); border-radius: 10px; }
.dsu-rma-art .m { font-size: .85rem; color: var(--rma-mu); margin-top: 2px; }
.dsu-rma-art .f { margin: 8px 0 4px; white-space: pre-line; }
.dsu-rma-eleg { display: inline-block; margin-top: 6px; font-size: .8rem; padding: 2px 8px; border-radius: 6px; background: rgba(120,120,120,.12); }
.dsu-rma-eleg.n-ok { background: #e7f5ea; color: #1e6b32; }
.dsu-rma-eleg.n-alerta { background: #fcf0d6; color: #7a4f00; }
.dsu-rma-res { margin-top: 8px; padding: 6px 10px; border-left: 3px solid #1e6b32; background: rgba(30,107,50,.08); }
.dsu-rma-linea { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--rma-ln); }
.dsu-rma-linea li { position: relative; padding: 0 0 14px 12px; }
.dsu-rma-linea li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--rma-ac); }
.dsu-rma-linea .f { font-size: .8rem; color: var(--rma-mu); margin-right: 6px; }
.dsu-rma-linea .n { margin-top: 4px; white-space: pre-line; }
.dsu-rma-linea li.interna { opacity: .7; }

@container (max-width: 780px) {
	.dsu-rma-cols { grid-template-columns: 1fr; }
	.dsu-rma-resumen { position: static; order: 2; }
	.dsu-rma-pasos { grid-template-columns: 1fr 1fr; }
}
@container (max-width: 520px) {
	.dsu-rma-campos { grid-template-columns: 1fr; }
	.dsu-rma-buscar { flex-wrap: wrap; }
	.dsu-rma-buscar select { width: 100%; }
	.dsu-rma-nav { flex-direction: column-reverse; }
	.dsu-rma-nav .button { width: 100%; text-align: center; }
	.dsu-rma-pasos .p { font-size: .78rem; padding: 6px 8px; }
}

/* Botones secundarios propios (el tema no estiliza .button genérico). */
.dsu-rma-app .dsu-rma-sec, .dsu-rma-compra .button, .dsu-rma-buscar .button { display: inline-flex; align-items: center; justify-content: center; padding: .6em 1.1em; border: 1px solid var(--rma-ln); border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; }
.dsu-rma-app .dsu-rma-sec:hover, .dsu-rma-compra .button:hover, .dsu-rma-buscar .button:hover { border-color: currentColor; }
.dsu-rma-compra .button:disabled { opacity: .45; cursor: default; }
