/* ============================================================
   Utrera ICC — reCAPTCHÓN · control de acceso (v1.5.79)
   El widget imita deliberadamente la convención visual de las
   casillas de verificación; el entorno sigue el Brand Book.
   ============================================================ */
:root {
  --utrera-ink: #071525;
  --utrera-navy: #001A3D;
  --utrera-petrol: #0757C8;
  --limestone: #F8FAFC;
  --ink-60: #66727F;
  --ink-50: #7C8A98;
  --signal-cyan: #00D7F2;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --rch-bg: #F9F9F9;
  --rch-border: #D3D3D3;
  --rch-box: #C1C1C1;
  --rch-text: #1F1F1F;
  --rch-word: #9AA0A6;
  --rch-ok: #009E55;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }
body.ut-rch {
  margin: 0;
  background: var(--limestone);
  color: var(--utrera-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.ut-rch__main {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 48px 16px;
}

.ut-rch__logo {
  display: block;
  width: min(360px, 82vw);
  height: auto;
}

.ut-rch__form { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }

/* ---------- Widget ---------- */
.rch {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 340px;
  min-height: 80px;
  padding: 0 12px 0 14px;
  background: var(--rch-bg);
  border: 1px solid var(--rch-border);
  border-radius: 3px;
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, .08);
}

.rch__check {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0 14px 0 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
}
.rch__check:focus { outline: none; }
.rch__check:focus-visible .rch__box { border-color: var(--utrera-petrol); box-shadow: 0 0 0 2px rgba(7, 87, 200, .25); }

.rch__box {
  position: absolute;
  inset: 1px;
  background: #fff;
  border: 2px solid var(--rch-box);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, border-color .15s ease;
}
.rch__check:hover .rch__box { border-color: #B2B2B2; }

.rch__spinner {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 4px solid rgba(7, 87, 200, .18);
  border-top-color: var(--utrera-petrol);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s ease, transform .25s ease;
}

.rch__tick {
  position: absolute;
  left: -2px;
  top: -4px;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--rch-ok);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  opacity: 0;
}

.rch[data-state="loading"] .rch__box { transform: scale(0); opacity: 0; }
.rch[data-state="loading"] .rch__spinner {
  opacity: 1;
  transform: scale(1);
  animation: rch-spin .8s linear infinite;
}
.rch[data-state="done"] .rch__box { transform: scale(0); opacity: 0; }
.rch[data-state="done"] .rch__tick {
  opacity: 1;
  animation: rch-draw .35s ease-out forwards;
}
.rch[data-state="loading"] .rch__check,
.rch[data-state="done"] .rch__check { cursor: default; }

.rch__label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--rch-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
}

.rch__brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  padding-top: 2px;
}
.rch__mark { width: 40px; height: 40px; display: block; }
.rch__word {
  color: var(--rch-word);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
}

.rch--long .rch__label { font-size: 14px; }
.rch--long { padding-top: 10px; padding-bottom: 10px; }

@keyframes rch-spin { to { transform: rotate(360deg); } }
@keyframes rch-draw { to { stroke-dashoffset: 0; } }

/* ---------- Estado y nota ---------- */
.ut-rch__status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--ink-60);
  font-size: 13px;
  text-align: center;
}

.ut-rch__note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink-50);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .06em;
  text-align: center;
}
.ut-rch__note span:first-child { text-transform: uppercase; font-weight: 700; }

@media (max-width: 360px) {
  .rch { padding: 0 8px 0 10px; }
  .rch__label { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .rch__box, .rch__spinner { transition: none; }
  .rch[data-state="loading"] .rch__spinner { animation-duration: 2s; }
  .rch[data-state="done"] .rch__tick { animation: none; stroke-dashoffset: 0; }
}
