/* Spinner, wordmark reveal y gateway de estudio (Cocua). */

.cocua-spinner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  vertical-align: middle;
  background: transparent;
}
.cocua-spinner svg {
  display: block;
  overflow: visible;
}
.cocua-spinner--sm svg { width: 28px; height: 28px; }
.cocua-spinner--md svg { width: 56px; height: 56px; }
.cocua-spinner--lg svg { width: 104px; height: 104px; }
.cocua-spin-word {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber, #de8a2c);
  opacity: 0;
  line-height: 1;
}
.cocua-spinner--lg .cocua-spin-word { font-size: 15px; }
.cocua-spinner--sm .cocua-spin-word { display: none; }

.bn-processing-icon:has(.cocua-spinner),
.pp-icon:has(.cocua-spinner),
.pp-icon.is-processing:has(.cocua-spinner),
.pp-icon.is-background:has(.cocua-spinner),
.bn-step2-loading-spin:has(.cocua-spinner),
.bn-wz-detect-spin:has(.cocua-spinner) {
  width: auto;
  height: auto;
  background: transparent;
  color: inherit;
  border-radius: 0;
}
.bn-wz-detect-spin:has(.cocua-spinner) {
  display: inline-flex;
  align-items: center;
}

/* Wordmark: cerrado → COCUA una vez por sesión */
.cocua-wordmark[data-cocua-reveal]:not(.is-revealed) .cocua-wordmark-text {
  opacity: 0;
}
.cocua-wordmark.is-revealing .cocua-mark-l {
  animation: cocua-reveal-l 520ms cubic-bezier(.22, 1, .28, 1) both;
}
.cocua-wordmark.is-revealing .cocua-mark-r {
  animation: cocua-reveal-r 520ms cubic-bezier(.22, 1, .28, 1) both;
}
.cocua-wordmark.is-revealing .cocua-wordmark-text {
  animation: cocua-etiqueta-word 360ms cubic-bezier(.22, 1, .28, 1) 160ms both;
}
@keyframes cocua-reveal-l {
  from { transform: translateX(6px); }
  to { transform: none; }
}
@keyframes cocua-reveal-r {
  from { transform: translateX(-6px); }
  to { transform: none; }
}
.cocua-mark-l, .cocua-mark-r {
  transform-box: fill-box;
  transform-origin: center;
}

/* Gateway cambio de estudio: isotipo original → acento → nombre dentro → abre */
.cocua-gw-root {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.cocua-gw-scrim {
  position: absolute;
  inset: 0;
  background: var(--bg, #f7f5ef);
  opacity: 0;
  transition: opacity 240ms ease;
}
.cocua-gw-scrim.is-on { opacity: 1; }
.cocua-gw-stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: visible;
}
.cocua-gw-brace {
  width: 36px;
  height: 88px;
  overflow: visible;
  flex-shrink: 0;
  will-change: transform;
}
.cocua-gw-brace.is-l { transform-origin: right center; }
.cocua-gw-brace.is-r { transform-origin: left center; }
.cocua-gw-name {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-sans, "Hanken Grotesk", sans-serif);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 30px);
  letter-spacing: 0.01em;
  color: #132a20;
  line-height: 1.15;
}

@media (prefers-reduced-motion: reduce) {
  .cocua-wordmark.is-revealing .cocua-mark-l,
  .cocua-wordmark.is-revealing .cocua-mark-r,
  .cocua-wordmark.is-revealing .cocua-wordmark-text {
    animation: none;
  }
  .cocua-wordmark[data-cocua-reveal] .cocua-wordmark-text { opacity: 1; }
}
