/**
 * vh-auth — componentes reutilizables Login/Register.
 */
.vh-auth-logo {
  font-family: var(--vh-auth-font-family);
  font-size: var(--vh-auth-font-size-logo);
  font-weight: var(--vh-auth-font-weight-bold);
  color: var(--vh-auth-accent);
  text-transform: lowercase;
  letter-spacing: var(--vh-auth-letter-spacing-logo);
  line-height: 1;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .vh-auth-logo {
    font-size: 1.65rem;
  }
}

.vh-auth-heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.vh-auth-title {
  margin: 0;
  font-family: var(--vh-auth-font-family);
  font-size: 18px;
  font-weight: 600;
  line-height: var(--vh-auth-line-height-title);
  color: #878787;
}

.vh-auth-subtitle {
  margin: 0;
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-semibold);
  color: var(--vh-auth-text-muted);
}

.vh-auth-section-label {
  margin: 0 0 -0.25rem;
  text-align: center;
  font-size: var(--vh-auth-font-size-label);
  font-weight: var(--vh-auth-font-weight-medium);
  color: var(--vh-auth-text-2);
}

.vh-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--vh-auth-font-size-label);
  font-weight: var(--vh-auth-font-weight-medium);
  color: var(--vh-auth-text-2);
}

.vh-auth-divider::before,
.vh-auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--vh-auth-border-alpha);
}

.vh-auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--vh-auth-field-gap);
  width: 100%;
}

.vh-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vh-auth-input {
  box-sizing: border-box;
  width: 100%;
  height: var(--vh-auth-input-h);
  padding: 0 0.75rem;
  border: 1px solid var(--vh-auth-border-input);
  border-radius: var(--vh-auth-radius-lg);
  background: var(--vh-auth-input-bg);
  font-family: var(--vh-auth-font-family);
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-regular);
  color: var(--vh-auth-text-1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vh-auth-input::placeholder {
  color: var(--vh-auth-input-placeholder);
}

.vh-auth-input:focus {
  outline: none;
  border-color: var(--vh-auth-border-focus);
  box-shadow: 0 0 0 2px var(--vh-auth-focus-ring);
}

.vh-auth-input:disabled,
.vh-auth-input[readonly] {
  opacity: 0.85;
  background: #f8fafc;
}

.vh-auth-field__hint {
  font-size: var(--vh-auth-font-size-label);
  color: var(--vh-auth-text-muted);
}

.vh-auth-field--password {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vh-auth-input-wrap {
  position: relative;
}

.vh-auth-input-wrap .vh-auth-input {
  padding-right: 2.75rem;
}

.vh-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  z-index: 1;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: var(--vh-auth-radius-lg);
  background: transparent;
  color: var(--vh-auth-text-muted);
  cursor: pointer;
}

.vh-auth-password-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vh-auth-password-toggle__icon--hide {
  display: none;
}

.vh-auth-password-toggle[aria-pressed="true"] .vh-auth-password-toggle__icon--show {
  display: none;
}

.vh-auth-password-toggle[aria-pressed="true"] .vh-auth-password-toggle__icon--hide {
  display: inline-flex;
}

.vh-auth-password-toggle:hover {
  color: var(--vh-auth-text-2);
}

.vh-auth-password-toggle:focus-visible {
  outline: 2px solid var(--vh-auth-border-focus);
  outline-offset: 2px;
}

.vh-auth-password-meter {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.vh-auth-password-meter__bar {
  flex: 1 1 0;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background-color 0.15s ease;
}

.vh-auth-password-meter.is-weak .vh-auth-password-meter__bar:nth-child(-n + 1) {
  background: #ef4444;
}

.vh-auth-password-meter.is-fair .vh-auth-password-meter__bar:nth-child(-n + 2) {
  background: #f59e0b;
}

.vh-auth-password-meter.is-good .vh-auth-password-meter__bar:nth-child(-n + 3) {
  background: #22c55e;
}

.vh-auth-password-meter.is-strong .vh-auth-password-meter__bar {
  background: #16a34a;
}

.vh-auth-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--vh-auth-btn-h);
  padding: 0 1rem;
  border: 0;
  border-radius: var(--vh-auth-radius-lg);
  font-family: var(--vh-auth-font-family);
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-medium);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.vh-auth-btn:focus-visible {
  outline: 2px solid var(--vh-auth-border-focus);
  outline-offset: 2px;
}

.vh-auth-btn:disabled,
.vh-auth-btn.is-loading {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.vh-auth-btn--primary {
  background: var(--vh-auth-btn-primary-bg);
  color: var(--vh-auth-btn-primary-fg);
}

.vh-auth-btn--primary:hover:not(:disabled) {
  background: var(--vh-auth-btn-primary-hover);
}

.vh-auth-btn--secondary {
  border: 1px solid var(--vh-auth-border-input);
  background: var(--vh-auth-btn-secondary-bg);
  color: var(--vh-auth-text-1);
}

.vh-auth-btn--secondary:hover {
  background: var(--vh-auth-btn-secondary-hover);
}

.vh-auth-btn--social {
  border: 1px solid var(--vh-auth-border-input);
  background: var(--vh-auth-btn-secondary-bg);
  color: var(--vh-auth-text-1);
}

.vh-auth-btn--social:hover {
  background: var(--vh-auth-btn-secondary-hover);
}

.vh-auth-btn__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.vh-auth-btn__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: vh-auth-spin 0.65s linear infinite;
}

.vh-auth-btn.is-loading .vh-auth-btn__label {
  opacity: 0.85;
}

.vh-auth-btn.is-loading .vh-auth-btn__spinner {
  display: inline-block;
}

@keyframes vh-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.vh-auth-link {
  color: var(--vh-auth-text-2);
  font-weight: var(--vh-auth-font-weight-semibold);
  text-decoration: none;
}

.vh-auth-link:hover {
  text-decoration: underline;
}

.vh-auth-link--accent {
  color: var(--vh-auth-accent);
}

.vh-auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vh-auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-semibold);
  color: var(--vh-auth-text-2);
}

.vh-auth-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: var(--vh-auth-accent);
}

.vh-auth-alert {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--vh-auth-radius-lg);
  font-size: var(--vh-auth-font-size-body);
}

.vh-auth-alert--error {
  background: var(--vh-auth-alert-error-bg);
  color: var(--vh-auth-alert-error-fg);
}

.vh-auth-alert--success {
  background: var(--vh-auth-alert-success-bg);
  color: var(--vh-auth-alert-success-fg);
}

.vh-auth-alert__title {
  margin: 0;
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-bold);
}

.vh-auth-alert__body {
  margin: 0;
  color: var(--vh-auth-text-2);
}

.vh-auth-alert__action {
  margin-top: 0.75rem;
}

.vh-auth-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.25rem;
  font-size: var(--vh-auth-font-size-label);
  font-weight: var(--vh-auth-font-weight-semibold);
}

.vh-auth-legal-note {
  margin: 0;
  text-align: center;
  font-size: var(--vh-auth-font-size-label);
  font-weight: var(--vh-auth-font-weight-medium);
  line-height: 1.5;
  color: var(--vh-auth-text-muted);
}

.vh-auth-main__inner > .vh-auth-locale {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: var(--vh-auth-form-max);
  margin-top: 1rem;
}

.vh-auth-captcha {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

/* Managed/invisible: sin iframe → sin hueco. Interactive challenge: reserva altura del widget. */
.vh-auth-captcha:has(.cf-turnstile iframe) {
  min-height: var(--vh-auth-captcha-min-h);
}

.vh-auth-nav-text {
  text-align: center;
  font-size: var(--vh-auth-font-size-label);
  font-weight: var(--vh-auth-font-weight-medium);
  color: var(--vh-auth-text-muted);
}

.vh-auth-locale {
  position: relative;
}

.vh-auth-locale__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: var(--vh-auth-radius-lg);
  background: transparent;
  font-family: var(--vh-auth-font-family);
  font-size: var(--vh-auth-font-size-body);
  font-weight: var(--vh-auth-font-weight-semibold);
  color: var(--vh-auth-accent);
  cursor: pointer;
}

.vh-auth-locale__trigger:hover {
  background: var(--vh-auth-btn-secondary-bg);
}

.vh-auth-locale__flag {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  object-fit: cover;
}

.vh-auth-locale__menu {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 0.5rem);
  left: 0;
  min-width: 10rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  border: 1px solid var(--vh-auth-border-input);
  border-radius: var(--vh-auth-radius-lg);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.vh-auth-locale__menu[hidden] {
  display: none;
}

.vh-auth-locale__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  font-family: var(--vh-auth-font-family);
  font-size: var(--vh-auth-font-size-body);
  color: var(--vh-auth-text-1);
  text-align: left;
  cursor: pointer;
}

.vh-auth-locale__option:hover {
  background: var(--vh-auth-btn-secondary-bg);
}

.vh-auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.vh-auth-google-btn {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: var(--vh-auth-btn-h);
}

.vh-auth-google-btn .g_id_signin {
  width: 100%;
  max-width: var(--vh-auth-form-max);
}
