/* Popup de términos y condiciones (registro + aviso obligatorio) */
.cdh-tyc { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: var(--cdh-font-body, Inter, sans-serif); }
.cdh-tyc[hidden] { display: none; }
.cdh-tyc *, .cdh-tyc *::before { box-sizing: border-box; }
.cdh-tyc__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cdh-tyc__dialog { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 720px; max-height: min(88vh, 860px); background: #fff; border-radius: 24px; box-shadow: 0 40px 90px rgba(0,0,0,.45); overflow: hidden; color: #141414; }
.cdh-tyc__head { padding: 22px 26px 14px; border-bottom: 1px solid #e7e5e0; background: #fff; }
.cdh-tyc__head h3 { margin: 0 0 6px; font-family: var(--cdh-font-display, 'Barlow Condensed', sans-serif); font-style: var(--cdh-display-style, italic); font-weight: var(--cdh-display-weight, 800); text-transform: uppercase; font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.05; color: #141414; }
.cdh-tyc__lead { margin: 0; font-size: .9rem; color: #6b6b72; line-height: 1.45; }
.cdh-tyc__body { flex: 1 1 auto; min-height: 180px; overflow-y: auto; padding: 18px 26px 26px; font-size: .95rem; line-height: 1.6; color: #2a2a2e; -webkit-overflow-scrolling: touch; }
.cdh-tyc__body h3 { margin: 22px 0 6px; font-size: 1.05rem; font-weight: 800; color: #141414; text-transform: none; font-style: normal; font-family: inherit; line-height: 1.3; }
.cdh-tyc__body h3:first-child { margin-top: 0; }
.cdh-tyc__body p { margin: 0 0 10px; }
.cdh-tyc__body ul, .cdh-tyc__body ol { margin: 0 0 12px 20px; padding: 0; }
.cdh-tyc__body li { margin-bottom: 4px; }
.cdh-tyc__loading, .cdh-tyc__err { color: #6b6b72; }
.cdh-tyc__err { color: #b41218; font-weight: 700; }
.cdh-tyc__foot { padding: 14px 26px 20px; border-top: 1px solid #e7e5e0; background: #faf9f6; }
.cdh-tyc__hint { margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: #6b6b72; }
.cdh-tyc__hint.is-ready { color: #1d7a43; }
.cdh-tyc__btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cdh-tyc__ok, .cdh-tyc__cancel { min-height: 48px; padding: 12px 24px; border-radius: 99px; font: 800 .85rem var(--cdh-font-body, Inter, sans-serif); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: .15s; }
.cdh-tyc__ok { border: 0; background: var(--cdh-primary, #d71920); color: #fff; box-shadow: 0 12px 24px color-mix(in srgb,var(--cdh-primary,#d71920) 30%,transparent); }
.cdh-tyc__ok:hover:not(:disabled) { background: var(--cdh-primary-dark, #b41218); transform: translateY(-1px); }
.cdh-tyc__ok:disabled { background: #c8c7c2; box-shadow: none; cursor: not-allowed; }
.cdh-tyc__cancel { border: 1px solid #d6d3cc; background: #fff; color: #141414; }
.cdh-tyc__cancel:hover { background: #f1efea; }
@media (max-width: 560px) {
	.cdh-tyc { padding: 0; align-items: flex-end; }
	.cdh-tyc__dialog { max-height: 94vh; border-radius: 22px 22px 0 0; }
	.cdh-tyc__head, .cdh-tyc__body, .cdh-tyc__foot { padding-left: 18px; padding-right: 18px; }
	.cdh-tyc__btns > button { flex: 1 1 100%; }
}
html.cdh-tyc-lock, html.cdh-tyc-lock body { overflow: hidden; }

/* fila "Aceptar términos y condiciones" dentro del formulario de registro */
.cdh-registro-tyc { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px dashed #d71920; border-radius: 16px; background: #fff6f6; }
.cdh-registro-tyc[hidden] { display: none; }
.cdh-registro-tyc__btn { flex: 0 0 auto; min-height: 44px; padding: 10px 20px; border: 2px solid #d71920; border-radius: 99px; background: #fff; color: #d71920; font: 800 .8rem var(--cdh-font-body, Inter, sans-serif); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: .15s; }
.cdh-registro-tyc__btn:hover { background: #d71920; color: #fff; }
.cdh-registro-tyc__txt { flex: 1 1 160px; font-size: .8rem; line-height: 1.35; color: #6b6b72; font-weight: 600; }
.cdh-registro-tyc.is-ok { border-style: solid; border-color: #1d7a43; background: #f1faf4; }
.cdh-registro-tyc.is-ok .cdh-registro-tyc__btn { border-color: #1d7a43; color: #1d7a43; }
.cdh-registro-tyc.is-ok .cdh-registro-tyc__btn:hover { background: #1d7a43; color: #fff; }
.cdh-registro-tyc.is-ok .cdh-registro-tyc__txt { color: #1d7a43; font-weight: 800; }

/* separación visual: el bloque de términos no pertenece al mensaje de contraseñas */
body #cdh-registro-modal .cdh-registro-tyc { margin-top: 16px; }
body #cdh-registro-modal .cdh-registro-missing { margin: 2px 0 0; font-size: .72rem; line-height: 1.35; font-weight: 700; color: #b41218; text-align: center; }
body #cdh-registro-modal .cdh-registro-missing[hidden] { display: none; }

body #cdh-registro-modal .cdh-registro-form__input.is-invalid { border-color: #b41218; background: #fff3f2; box-shadow: 0 0 0 3px rgba(180,18,24,.12); }

/* Texto de los términos más chico y compacto, tipo contrato (v1.69.10) */
.cdh-tyc__body { font-size: .74rem; line-height: 1.32; padding: 14px 24px 20px; text-align: justify; hyphens: auto; }
.cdh-tyc__body h3 { margin: 12px 0 3px; font-size: .8rem; line-height: 1.25; text-align: left; letter-spacing: .01em; }
.cdh-tyc__body h3:first-child { margin-top: 0; }
.cdh-tyc__body p { margin: 0 0 5px; }
.cdh-tyc__body ul, .cdh-tyc__body ol { margin: 0 0 6px 16px; }
.cdh-tyc__body li { margin-bottom: 2px; }
@media (max-width: 560px) { .cdh-tyc__body { padding-left: 16px; padding-right: 16px; text-align: left; } }

/* recuadro de términos marcado en rojo cuando falta aceptarlos (sin mensajes) */
.cdh-registro-tyc.is-missing { border-style: solid; border-color: #b41218; background: #fde4e2; }
body #cdh-registro-modal .cdh-registro-missing { display: none !important; }

/* "Crear cuenta" gris mientras el formulario está incompleto, pero se puede presionar (marca los campos en rojo) */
body #cdh-registro-modal .cdh-registro-form__submit.is-incomplete,
body #cdh-registro-modal .cdh-registro-form__submit.is-incomplete:hover { background: #c8c7c2; color: #fff; box-shadow: none; opacity: 1; transform: none; cursor: pointer; }

/* tooltip del campo con error (p. ej. "Mínimo 10 dígitos"): aparece al pasar el mouse o enfocar el campo */
body #cdh-registro-modal .cdh-registro-form__field[data-tip] { position: relative; }
body #cdh-registro-modal .cdh-registro-form__field[data-tip]::after {
	content: attr(data-tip); position: absolute; right: 10px; bottom: 30px; z-index: 20;
	background: #b41218; color: #fff; font: 700 .68rem/1.2 var(--cdh-font-body, Inter, sans-serif);
	padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none;
	opacity: 0; transform: translateY(3px); transition: .15s; box-shadow: 0 6px 14px rgba(0,0,0,.2);
}
body #cdh-registro-modal .cdh-registro-form__field[data-tip]:hover::after,
body #cdh-registro-modal .cdh-registro-form__field[data-tip]:focus-within::after { opacity: 1; transform: translateY(0); }
