/* Tarjetas regalo · formulario de compra, resumen, botón de acceso rápido y bloque del código en el pedido.
   Todo cuelga de .ts-w y usa el prefijo ts-rgf- / ts-bono-. Cortes responsive: 960 y 600 px.
   Sin JavaScript se ven todas las opciones salvo donde :has() oculta lo que no toca; con JavaScript el formulario lleva .ts-rgf-js y
   los atributos data-tipo / data-modo / data-sel. */

.ts-w .ts-rgf { --rgf-borde: #cbb78a; font-family: var(--ts-fuente); color: var(--ts-granate); line-height: 1.5; }
.ts-w .ts-rgf :where(fieldset, legend, p, dl, dd, ul, h3) { margin: 0; padding: 0; }
.ts-w .ts-rgf fieldset { border: 0; min-width: 0; }
.ts-w .ts-rgf :focus-visible { outline: 3px solid var(--ts-granate); outline-offset: 3px; }

/* disposición */
.ts-w .ts-rgf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.ts-w .ts-rgf-pasos { display: grid; gap: 22px; min-width: 0; }
.ts-w .ts-rgf-paso { padding: 30px; border-radius: 26px; background: #fff; border: 1.5px solid var(--ts-linea); }
.ts-w .ts-rgf-paso > legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.3px; color: var(--ts-granate); }
.ts-w .ts-rgf-paso > legend ~ * { clear: both; }
.ts-w .ts-rgf-num { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ts-granate); color: var(--ts-amarillo); font-size: 15px; font-weight: 800; line-height: 1; }
.ts-w .ts-rgf-opc { font-size: 14px; font-weight: 600; color: var(--ts-suave); letter-spacing: 0; }
.ts-w .ts-rgf-sub { margin-bottom: 16px; font-size: 15px; color: #3a1318; max-width: 62ch; }
.ts-w .ts-rgf-peq { font-size: 14.5px; font-weight: 500; line-height: 1.45; }

/* opciones en tarjeta (radio con tarjeta clicable) */
.ts-w .ts-rgf-op { position: relative; display: block; margin: 0; cursor: pointer; }
.ts-w .ts-rgf-op > input, .ts-w .ts-rgf-pl > input, .ts-w .ts-rgf-modo > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; appearance: none; }
.ts-w .ts-rgf-cuerpo { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 24px; border-radius: 22px; background: #fff; border: 2px solid var(--ts-linea); color: var(--ts-granate); transition: background .15s, border-color .15s, color .15s; }
.ts-w .ts-rgf-op:hover > .ts-rgf-cuerpo { border-color: var(--ts-granate); }
.ts-w .ts-rgf-op > input:checked + .ts-rgf-cuerpo { background: var(--ts-granate); border-color: var(--ts-granate); color: var(--ts-crema); }
.ts-w .ts-rgf-op > input:checked + .ts-rgf-cuerpo strong { color: var(--ts-amarillo); }
.ts-w .ts-rgf-op > input:focus-visible + .ts-rgf-cuerpo { outline: 3px solid var(--ts-granate); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }
/* marca de selección que no depende solo del color: círculo con punto (se lee como «una sola opción», no como casilla) */
.ts-w .ts-rgf-op-tipo > .ts-rgf-cuerpo::after, .ts-w .ts-rgf-op-form > .ts-rgf-cuerpo::after { content: ""; position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rgf-borde); background: #fff; box-sizing: border-box; transition: border-color .15s, background .15s; }
.ts-w .ts-rgf-op-tipo > input:checked + .ts-rgf-cuerpo::after, .ts-w .ts-rgf-op-form > input:checked + .ts-rgf-cuerpo::after { border-color: var(--ts-amarillo); background: radial-gradient(circle, var(--ts-amarillo) 0 6px, transparent 7px); }
/* «Elegida» en texto (se lee también con lector de pantalla; solo se ve en la tarjeta marcada) */
.ts-w .ts-rgf-elegida { display: none; align-items: center; gap: 6px; width: fit-content; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--ts-amarillo); color: var(--ts-granate); font-size: 12.5px; font-weight: 800; line-height: 1.4; letter-spacing: .02em; }
.ts-w .ts-rgf-elegida::before { content: ""; width: 12px; height: 12px; background: center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%235B1117' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ts-w .ts-rgf-op > input:checked + .ts-rgf-cuerpo .ts-rgf-elegida { display: inline-flex; }
/* cinta «Has elegido esta formación»: solo con el enlace «Regalar esta formación» y mientras siga marcada */
.ts-w .ts-rgf-cinta { display: none; position: absolute; top: -12px; left: 18px; z-index: 1; padding: 3px 12px; border-radius: 999px; background: var(--ts-amarillo); color: var(--ts-granate); font-size: 12px; font-weight: 800; letter-spacing: .03em; line-height: 1.35; white-space: nowrap; box-shadow: 0 0 0 3px #fff; }
.ts-w .ts-rgf-op > input:checked + .ts-rgf-cuerpo .ts-rgf-cinta { display: inline-block; }

.ts-w .ts-rgf-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ts-w .ts-rgf-op-tipo > .ts-rgf-cuerpo { gap: 8px; padding: 24px 26px 26px; }
.ts-w .ts-rgf-op-tipo .ts-rg-ic { width: 40px; height: 40px; margin-bottom: 4px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ts-w .ts-rgf-op-tipo strong { font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -.3px; padding-right: 30px; }
.ts-w .ts-rgf-op-tipo > input:checked + .ts-rgf-cuerpo .ts-rg-ic { color: var(--ts-amarillo); }

/* modo (Barista Room): importe a elegir / formación concreta */
.ts-w .ts-rgf-modos { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 999px; background: var(--ts-crema); }
.ts-w .ts-rgf-modo { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.ts-w .ts-rgf-modo > span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 800; color: var(--ts-granate); transition: background .15s, color .15s; }
.ts-w .ts-rgf-modo > input:checked + span { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-rgf-modo > input:focus-visible + span { outline: 3px solid var(--ts-granate); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }

/* formaciones y plazas */
.ts-w .ts-rgf-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-w .ts-rgf-op-form > .ts-rgf-cuerpo { flex-direction: row; align-items: center; gap: 14px; padding: 14px 52px 14px 14px; }
.ts-w .ts-rgf-foto { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--ts-crema); }
.ts-w .ts-rgf-form-tx { display: grid; gap: 2px; min-width: 0; }
.ts-w .ts-rgf-form-tx strong { font-size: 16px; line-height: 1.25; font-weight: 800; }
.ts-w .ts-rgf-forms { padding-top: 12px; }
.ts-w .ts-rgf-op-form > .ts-rgf-cuerpo:has(.ts-rgf-cinta) { padding-top: 28px; }
.ts-w .ts-rgf-mini { margin-top: 20px; font-size: 13.5px; font-weight: 800; letter-spacing: .01em; color: var(--ts-granate); }
.ts-w .ts-rgf-sub strong { font-weight: 800; }
.ts-w .ts-rgf-aclara { position: relative; margin-top: 18px; padding: 16px 20px 16px 58px; border-radius: 18px; background: var(--ts-crema-claro); border: 1.5px solid var(--ts-linea); border-left: 6px solid var(--ts-granate); color: var(--ts-granate); font-size: 15px; font-weight: 600; line-height: 1.5; }
.ts-w .ts-rgf-aclara::before { content: "i"; position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ts-granate); color: var(--ts-amarillo); font: 800 15px/1 var(--ts-fuente); }
/* sin JavaScript: de las frases de la aclaración se ve solo la de la formación y las plazas marcadas (las reglas por formación van en línea en la página) */
.ts-w .ts-rgf:not(.ts-rgf-js) .ts-rgf-ac { display: none; }
.ts-w .ts-rgf:not(.ts-rgf-js):not(:has(input[name="formacion"]:checked)) .ts-rgf-ac-sin { display: inline; }
.ts-w .ts-rgf-nojs { padding: 10px 14px; border-radius: 12px; background: var(--ts-crema-claro); border: 1.5px solid var(--ts-linea); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.ts-w .ts-rgf-plazas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.ts-w .ts-rgf-pl { position: relative; display: block; margin: 0; cursor: pointer; }
.ts-w .ts-rgf-pl-c { display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; border-radius: 18px; border: 2px solid var(--ts-linea); background: #fff; color: var(--ts-granate); transition: background .15s, border-color .15s; }
.ts-w .ts-rgf-pl-c strong { font-size: 16px; font-weight: 800; }
.ts-w .ts-rgf-pl:hover > .ts-rgf-pl-c { border-color: var(--ts-granate); }
.ts-w .ts-rgf-pl > input:checked + .ts-rgf-pl-c { background: var(--ts-granate); border-color: var(--ts-granate); color: var(--ts-crema); }
.ts-w .ts-rgf-pl > input:checked + .ts-rgf-pl-c strong { color: var(--ts-amarillo); }
.ts-w .ts-rgf-pl > input:focus-visible + .ts-rgf-pl-c { outline: 3px solid var(--ts-granate); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }

/* tramos */
.ts-w .ts-rgf-tramos { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 16px 12px; padding-top: 12px; }
.ts-w .ts-rgf-op-tramo > .ts-rgf-cuerpo { align-items: center; justify-content: center; min-height: 88px; padding: 18px 8px; text-align: center; }
.ts-w .ts-rgf-cifra { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.8px; color: var(--ts-granate); }
.ts-w .ts-rgf-cifra-txt { font-size: 18px; letter-spacing: -.2px; line-height: 1.2; }
.ts-w .ts-rgf-op-tramo > input:checked + .ts-rgf-cuerpo .ts-rgf-cifra::before { content: "✓"; content: "✓" / ""; margin-right: 8px; font-size: .62em; vertical-align: .18em; }
.ts-w .ts-rgf-etiqueta { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 11px; border-radius: 999px; background: var(--ts-granate); color: var(--ts-amarillo); font-size: 11.5px; font-weight: 800; letter-spacing: .03em; line-height: 1.3; white-space: nowrap; box-shadow: 0 0 0 3px #fff; }
.ts-w .ts-rgf-op > input:checked + .ts-rgf-cuerpo .ts-rgf-etiqueta { background: var(--ts-amarillo); color: var(--ts-granate); }
.ts-w .ts-rgf-otro { margin-top: 20px; max-width: 360px; }
.ts-w .ts-rgf-otro > label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--ts-granate); line-height: 1.4; }
.ts-w .ts-rgf-euros { position: relative; }
.ts-w .ts-rgf-euros input { padding-right: 46px !important; font-size: 20px !important; font-weight: 800 !important; }
.ts-w .ts-rgf-euros > span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 800; color: var(--ts-granate); pointer-events: none; }

/* campos */
.ts-w .ts-rgf-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.ts-w .ts-rgf-campo { min-width: 0; }
.ts-w .ts-rgf-campo-ancho { grid-column: 1 / -1; }
.ts-w .ts-rgf-campo > label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--ts-granate); line-height: 1.4; }
.ts-w .ts-rgf input[type="text"], .ts-w .ts-rgf input[type="email"], .ts-w .ts-rgf input[type="date"] { display: block; width: 100%; min-height: 50px; margin: 0; padding: 12px 20px; border: 1.5px solid var(--rgf-borde); border-radius: 999px; background: #fff; box-shadow: none; font: 500 16px/1.3 var(--ts-fuente); color: var(--ts-granate); appearance: none; }
.ts-w .ts-rgf textarea { display: block; width: 100%; min-height: 110px; margin: 0; padding: 14px 20px; border: 1.5px solid var(--rgf-borde); border-radius: 22px; background: #fff; box-shadow: none; font: 500 16px/1.5 var(--ts-fuente); color: var(--ts-granate); resize: vertical; }
.ts-w .ts-rgf input::placeholder, .ts-w .ts-rgf textarea::placeholder { color: var(--ts-suave); opacity: 1; }
.ts-w .ts-rgf input:focus, .ts-w .ts-rgf textarea:focus { outline: 3px solid var(--ts-granate); outline-offset: 2px; border-color: var(--ts-granate); }
.ts-w .ts-rgf [aria-invalid="true"] { border-color: var(--ts-granate) !important; box-shadow: 0 0 0 3px var(--ts-amarillo) !important; }
.ts-w .ts-rgf-contador { margin-top: 6px; text-align: right; font-size: 13px; font-weight: 600; color: var(--ts-suave); }
.ts-w .ts-rgf-contador.ts-rgf-contador-lleno { color: var(--ts-granate); font-weight: 800; }
.ts-w .ts-rgf-ayuda { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--ts-suave); }
.ts-w .ts-rgf-rgpd { margin-top: 18px; max-width: 62ch; }
.ts-w .ts-rgf-ayuda a { color: var(--ts-granate); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* errores */
.ts-w .ts-rgf-err { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--ts-granate); border: 1.5px solid var(--ts-granate); border-left-width: 6px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.ts-w .ts-rgf-err[hidden], .ts-w .ts-rgf-errores[hidden] { display: none; }
.ts-w .ts-rgf-err-ic { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ts-granate); color: var(--ts-amarillo); font-size: 14px; font-weight: 800; line-height: 1; }
.ts-w .ts-rgf-errores { margin: 0 0 22px; padding: 18px 20px; border-radius: 18px; background: var(--ts-granate-osc); color: #fff; border-left: 6px solid var(--ts-amarillo); font-size: 15px; font-weight: 600; line-height: 1.5; }
.ts-w .ts-rgf-errores strong { color: var(--ts-amarillo); font-weight: 800; }
.ts-w .ts-rgf-errores ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ts-w .ts-rgf-errores li a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ts-w .ts-rgf-errores :focus-visible { outline-color: var(--ts-amarillo); }

/* visibilidad según lo elegido: con JavaScript por atributos, sin él con :has() */
.ts-w .ts-rgf.ts-rgf-js:not([data-tipo="barista"]) .ts-rgf-solo-barista,
.ts-w .ts-rgf.ts-rgf-js:not([data-tipo="barista"]) .ts-rgf-bloque-plazas,
.ts-w .ts-rgf.ts-rgf-js:not([data-modo="plazas"]) .ts-rgf-bloque-plazas,
.ts-w .ts-rgf.ts-rgf-js[data-tipo="barista"][data-modo="plazas"] .ts-rgf-bloque-importe,
.ts-w .ts-rgf.ts-rgf-js:not([data-sel="otro"]) .ts-rgf-otro { display: none; }
.ts-w .ts-rgf:not(.ts-rgf-js):not(:has(input[name="tipo"][value="barista"]:checked)) .ts-rgf-solo-barista,
.ts-w .ts-rgf:not(.ts-rgf-js):not(:has(input[name="tipo"][value="barista"]:checked)) .ts-rgf-bloque-plazas,
.ts-w .ts-rgf:not(.ts-rgf-js):not(:has(input[name="modo"][value="plazas"]:checked)) .ts-rgf-bloque-plazas,
.ts-w .ts-rgf:not(.ts-rgf-js):has(input[name="tipo"][value="barista"]:checked):has(input[name="modo"][value="plazas"]:checked) .ts-rgf-bloque-importe,
.ts-w .ts-rgf:not(.ts-rgf-js):not(:has(input[name="importe_sel"][value="otro"]:checked)) .ts-rgf-otro { display: none; }

/* resumen */
.ts-w .ts-rgf-resumen { position: sticky; top: calc(var(--ts-sticky-top, 0px) + 24px); display: grid; gap: 16px; padding: 24px; border-radius: 26px; background: #fff; border: 1.5px solid var(--ts-linea); box-shadow: 0 18px 40px -26px rgba(63, 21, 14, .5); }
.ts-w .ts-rgf-tarjeta { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; min-height: 188px; padding: 22px 24px; border-radius: 22px; background: var(--ts-granate); color: var(--ts-crema); isolation: isolate; }
.ts-w .ts-rgf-tarjeta::before { content: ""; position: absolute; z-index: -1; right: -48px; top: -62px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 0, .12); }
.ts-w .ts-rgf-tarjeta::after { content: ""; position: absolute; z-index: -1; right: 36px; bottom: -92px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 0, .07); }
.ts-w .ts-rgf-tarjeta-logo { display: block; color: var(--ts-amarillo); }
.ts-w .ts-rgf-tarjeta-logo svg { height: 22px; width: auto; fill: currentColor; }
.ts-w .ts-rgf-tarjeta-eti { position: absolute; top: 22px; right: 24px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ts-crema); }
.ts-w .ts-rgf-tarjeta-imp { align-self: center; font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -1.6px; color: var(--ts-amarillo); }
.ts-w .ts-rgf-tarjeta-tipo { font-size: 13.5px; font-weight: 700; letter-spacing: .04em; color: var(--ts-crema); }
.ts-w .ts-rgf-resumen h3 { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.3px; color: var(--ts-granate); }
.ts-w .ts-rgf-dl { display: grid; gap: 10px; margin: 0; }
.ts-w .ts-rgf-dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.ts-w .ts-rgf-dl dt { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-suave); }
.ts-w .ts-rgf-dl dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ts-granate); overflow-wrap: anywhere; }
.ts-w .ts-rgf-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 2px solid var(--ts-linea); font-size: 15px; font-weight: 700; }
.ts-w .ts-rgf-total strong { font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: -1px; color: var(--ts-granate); }
.ts-w .ts-rgf-nota { font-size: 13px; line-height: 1.5; color: var(--ts-suave); }

/* botón principal (amarillo con texto granate) */
.ts-w .ts-rgf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 14px 30px; border: 0; border-radius: 999px; background: var(--ts-amarillo); color: var(--ts-granate); font: 800 15px/1.2 var(--ts-fuente); letter-spacing: .02em; text-align: center; cursor: pointer; box-shadow: inset 0 0 0 2px var(--ts-granate); transition: background .15s, color .15s; }
.ts-w .ts-rgf-btn:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-rgf-btn:focus-visible { outline: 3px solid var(--ts-granate); outline-offset: 3px; }
.ts-w .ts-rgf-btn[disabled], .ts-w .ts-rgf-btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.ts-w .ts-rgf-resumen .ts-rgf-btn { width: 100%; }

/* botón de acceso rápido: «Regalar esta formación» (se puede poner en fichas y listados) */
.ts-w.ts-bono-wrap { display: inline-block; }
.ts-w .ts-bono-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 11px 22px; border-radius: 999px; font: 700 14px/1.25 var(--ts-fuente); letter-spacing: .01em; text-decoration: none; text-align: center; transition: background .15s, color .15s, box-shadow .15s; }
.ts-w .ts-bono-btn .ts-bono-ic { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ts-w .ts-bono-btn:focus-visible { outline: 3px solid var(--ts-granate); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }
.ts-w .ts-bono-btn--amarillo { background: var(--ts-amarillo); color: var(--ts-granate); }
.ts-w .ts-bono-btn--amarillo:hover { background: #fff; color: var(--ts-granate); box-shadow: inset 0 0 0 2px var(--ts-granate); }
.ts-w .ts-bono-btn--granate { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-bono-btn--granate:hover { background: var(--ts-granate-osc); color: var(--ts-amarillo); }
.ts-w .ts-bono-btn--linea { background: transparent; color: var(--ts-granate); box-shadow: inset 0 0 0 2px var(--ts-granate); }
.ts-w .ts-bono-btn--linea:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-bono-btn--texto { padding-left: 4px; padding-right: 4px; background: transparent; color: var(--ts-granate); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ts-w .ts-bono-btn--texto:hover { color: var(--ts-granate-osc); }

/* el código en la confirmación del pedido y en Mi cuenta */
.ts-w .ts-bono-pedido { margin: 28px 0; padding: 26px 28px; border-radius: 24px; background: var(--ts-crema); color: var(--ts-granate); font-family: var(--ts-fuente); line-height: 1.5; }
.ts-w .ts-bono-pedido h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.4px; color: var(--ts-granate); }
.ts-w .ts-bono-pedido p { margin: 0 0 12px; font-size: 15.5px; }
.ts-w .ts-bono-pedido-t { margin: 16px 0; padding: 20px 22px; border-radius: 20px; background: var(--ts-granate); color: var(--ts-crema); }
.ts-w .ts-bono-pedido-t { container-type: inline-size; }
.ts-w .ts-bono-pedido-t p { margin: 0; }
.ts-w .ts-bono-pedido-eti { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ts-crema); }
.ts-w .ts-bono-pedido-cod { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 10px 0 6px !important; }
.ts-w .ts-bono-pedido-cod code { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 8px 18px; border-radius: 14px; border: 2px dashed var(--ts-amarillo); background: transparent; color: var(--ts-amarillo); font: 800 26px/1.2 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .06em; white-space: nowrap; user-select: all; }
/* el código cabe siempre en una línea: si la columna es estrecha (pago de WooCommerce), la letra se ajusta al ancho de la tarjeta */
@supports (font-size: 1cqw) { .ts-w .ts-bono-pedido-cod code { font-size: clamp(14px, calc((100cqw - 44px) / 9.8), 26px); } }
@supports not (font-size: 1cqw) { .ts-w .ts-bono-pedido-cod code { font-size: 18px; white-space: normal; overflow-wrap: anywhere; } }
.ts-w .ts-bono-copiar { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: var(--ts-amarillo); color: var(--ts-granate); font: 800 14px/1.2 var(--ts-fuente); cursor: pointer; }
.ts-w .ts-bono-copiar:hover { background: #fff; }
.ts-w .ts-bono-copiar:focus-visible { outline: 3px solid var(--ts-amarillo); outline-offset: 3px; }
/* «Descargar PDF para imprimir»: enlace normal (funciona sin JavaScript) con forma de botón secundario, junto a «Copiar código» */
.ts-w .ts-bono-pedido a.ts-bono-pdf { display: inline-flex; align-items: center; box-sizing: border-box; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--ts-amarillo); background: transparent; color: var(--ts-amarillo); font: 800 14px/1.2 var(--ts-fuente); text-decoration: none; cursor: pointer; }
.ts-w .ts-bono-pedido a.ts-bono-pdf:hover { background: var(--ts-amarillo); color: var(--ts-granate); text-decoration: none; }
.ts-w .ts-bono-pedido a.ts-bono-pdf:focus-visible { outline: 3px solid var(--ts-amarillo); outline-offset: 3px; }
.ts-w .ts-bono-pedido .ts-bono-pedido-cad { margin: 0; font-size: 14.5px; color: var(--ts-crema); }
.ts-w .ts-bono-pedido .ts-bono-pedido-ayuda { margin: 0; font-size: 14.5px; color: #3a1318; }

/* Portátil de pantalla baja: el resumen fijo no puede ser más alto que lo que se ve (el botón «Añadir al carrito» tiene que alcanzarse siempre).
   Primero se quita la tarjeta decorativa (repite el importe) y, por si aun así no cabe, el resumen se desplaza por dentro. */
@media (min-width: 961px) {
	.ts-w .ts-rgf-resumen { max-height: calc(100vh - var(--ts-sticky-top, 0px) - 48px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (min-width: 961px) and (max-height: 760px) {
	.ts-w .ts-rgf-tarjeta { display: none; }
}
@media (max-width: 960px) {
	.ts-w .ts-rgf-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.ts-w .ts-rgf-resumen { position: static; }
}
@media (max-width: 600px) {
	.ts-w .ts-rgf-paso { padding: 24px 18px; border-radius: 22px; }
	.ts-w .ts-rgf-paso > legend { font-size: 19px; }
	.ts-w .ts-rgf-dos, .ts-w .ts-rgf-forms, .ts-w .ts-rgf-campos { grid-template-columns: minmax(0, 1fr); }
	.ts-w .ts-rgf-tramos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ts-w .ts-rgf-plazas { grid-template-columns: minmax(0, 1fr); }
	.ts-w .ts-rgf-modos { display: flex; width: 100%; border-radius: 26px; }
	.ts-w .ts-rgf-modo { flex: 1 1 100%; }
	.ts-w .ts-rgf-modo > span { width: 100%; justify-content: center; }
	.ts-w .ts-rgf-resumen { padding: 18px; border-radius: 22px; }
	.ts-w .ts-rgf-tarjeta-imp { font-size: 40px; }
	.ts-w .ts-rgf-dl > div { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
	.ts-w .ts-bono-pedido { padding: 22px 18px; }
	.ts-w .ts-bono-pedido-cod code { letter-spacing: .04em; }
	.ts-w .ts-rgf-otro { max-width: none; }
}
/* sin JavaScript el resumen no se actualiza: no enseña importes que podrían no ser los elegidos (queda la nota y el botón) */
@media (scripting: none) { .ts-w .ts-rgf-tarjeta, .ts-w .ts-rgf-dl, .ts-w .ts-rgf-total { display: none; } }
@media (prefers-reduced-motion: reduce) {
	.ts-w .ts-rgf-cuerpo, .ts-w .ts-rgf-pl-c, .ts-w .ts-rgf-modo > span, .ts-w .ts-rgf-btn, .ts-w .ts-bono-btn { transition: none; }
}
