/* ==========================================================================
   Aybar · Compra en línea · «¿Te guardamos esta cotización?» (public/js/tigo/guardar-cotizacion.js)
   Usa los tokens y piezas de compra.css (.boton, .entrada, .consentimiento). Dos formas:
   - .tg-gc--hoja: una hoja que no bloquea (abajo a la derecha en escritorio, abajo y a lo ancho en el celular);
   - .tg-gc--en-aviso: dentro del aviso de salida de compra.js (<dialog data-ref="d-salida">), para no apilar dos.
   ========================================================================== */

.tg-gc { position: relative; text-align: left; color: var(--texto, #0b1416); font-family: var(--t-texto, system-ui, sans-serif); }
.tg-gc--hoja {
    position: fixed; z-index: 2147483000; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
    padding: 22px 22px 14px; border-radius: var(--r-pieza, 24px); background: var(--superficie, #fff); border: 1px solid var(--linea, #e3e8e9);
    box-shadow: 0 24px 60px -24px rgba(1, 34, 42, .55);
    opacity: 0; transform: translateY(16px); transition: opacity var(--d-media, .32s) var(--curva, ease), transform var(--d-media, .32s) var(--curva, ease);
}
.tg-gc--hoja.tg-gc--visible { opacity: 1; transform: none; }
.tg-gc--en-aviso { margin: 0 0 18px; padding: 16px; border-radius: var(--r-tarjeta, 16px); background: var(--superficie-marca, #e8f3f4); }
.tg-gc__x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r-control, 10px); background: none; color: var(--texto-2, #37555c); font-size: 26px; line-height: 1; cursor: pointer; }
.tg-gc__x:hover { background: var(--superficie-2, #f1f4f4); }
.tg-gc__x:focus-visible, .tg-gc__canal:focus-visible { outline: 3px solid var(--mandarina, #f89100); outline-offset: 2px; }
.tg-gc__titulo { margin: 0 44px 6px 0; font-family: var(--t-titulo, inherit); font-size: 20px; line-height: 1.25; color: var(--texto-marca, #02424e); }
.tg-gc__titulo:focus { outline: none; }
.tg-gc__intro, .tg-gc__nota { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--texto-2, #37555c); }
.tg-gc__nota { margin: 10px 0 0; font-size: 13px; }
.tg-gc__resumen { display: grid; gap: 6px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-control, 10px); background: var(--superficie-2, #f1f4f4); }
.tg-gc--en-aviso .tg-gc__resumen { background: var(--superficie, #fff); }
.tg-gc__resumen div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tg-gc__resumen dt { color: var(--texto-2, #37555c); }
.tg-gc__resumen dd { margin: 0; font-weight: 700; text-align: right; color: var(--texto, #0b1416); font-variant-numeric: tabular-nums; }
.tg-gc__form { display: grid; gap: 10px; }
.tg-gc__mios { min-height: 56px; flex-direction: column; gap: 2px; }
.tg-gc__mios small { font-size: 13px; font-weight: 500; opacity: .9; }
.tg-gc__o { margin: 2px 0; font-size: 13px; text-align: center; color: var(--texto-3, #5d7479); }
.tg-gc__canales { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: var(--r-control, 10px); background: var(--superficie-2, #f1f4f4); }
.tg-gc__canal { min-height: 44px; border: 0; border-radius: 8px; background: none; color: var(--texto-2, #37555c); font-family: var(--t-titulo, inherit); font-size: 15px; font-weight: 600; cursor: pointer; }
.tg-gc__canal[aria-checked="true"] { background: var(--superficie, #fff); color: var(--texto-marca, #02424e); box-shadow: 0 1px 3px rgba(1, 34, 42, .18); }
.tg-gc__etiqueta { font-size: 14px; font-weight: 600; color: var(--texto, #0b1416); }
.tg-gc__campo { display: flex; align-items: center; gap: 8px; }
.tg-gc__prefijo { font-weight: 600; color: var(--texto-2, #37555c); }
.tg-gc__consentimiento { font-size: 13px; padding: 12px; }
.tg-gc__trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tg-gc__error { margin: 0; padding: 8px 12px; border-radius: var(--r-control, 10px); background: var(--error-fondo, #ffeee8); color: var(--error-texto, #b3261e); font-size: 14px; }
.tg-gc__error[hidden] { display: none; }
.tg-gc__estado { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tg-gc__no { display: block; margin: 6px auto 0; }
.tg-gc__listo { display: grid; gap: 8px; }
.tg-gc__ok { margin: 0; padding: 12px 14px; border-radius: var(--r-control, 10px); background: var(--ok-fondo, #e8fef3); border: 1px solid var(--ok-borde, #adedcf); color: var(--ok-texto, #0b6b45); font-weight: 600; line-height: 1.45; }
.tg-gc__sandbox { margin: 0; font-size: 13px; color: var(--aviso-texto, #8a5a00); }

@media (max-width: 640px) {
    .tg-gc--hoja { left: 0; right: 0; bottom: 0; width: auto; max-height: 88dvh; border-radius: var(--r-pieza, 24px) var(--r-pieza, 24px) 0 0; padding: 20px 16px calc(14px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .tg-gc--hoja { transition: none; transform: none; }
}
