/* INeKO account module — login + profile.
   Field styling comes from css/forms.css (.ineko-form) and .button.cta from
   main-ci.css; only the account-specific bits live here. Accent: --royal.
   Gate = a centered, borderless card; profile = full-column width (contact form). */

.ineko-account [hidden] { display: none !important; }

/* Login gate: a compact, centered, borderless card. The .ineko-form flex gap
   (1.5rem) is too loose for a card, so we zero it and place each element with a
   deliberate margin instead. */
.ineko-account--gate { max-width: 460px; margin: 0 auto; text-align: center; }
.ineko-account--gate .ineko-form { gap: 0; }
.ineko-account--gate .ineko-form-field { text-align: left; } /* keep field text left while the card centers */
.ineko-account--gate .ineko-form__fields { margin: 0 0 26px; }
.ineko-account--gate .ineko-form__submit { display: flex; margin: 0; }
/* full-width, centered button (override .button.cta width:fit-content / align-self) */
.ineko-account--gate .ineko-form__submit .submit-button { width: 100%; }
.ineko-account--gate .cf-turnstile { display: flex; justify-content: center; }

/* Profile: fill the content column, fields flow like the contact form. */
.ineko-account--profile { width: 100%; }
.ineko-account--profile .ineko-form__submit { display: flex; align-items: center; gap: 20px; margin-top: 8px; }
.ineko-account--profile .ineko-account__logout { margin: 0; }

.ineko-account__badge {
  width: 46px; height: 46px; margin: 0 auto 18px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 12px;
  background: var(--royal-5, #eef0f6); color: var(--royal, #051255);
}
/* Speichern button spinner (replaces the success/error alert) */
.ineko-account__spinner { display: none; }
.submit-button.is-loading { color: transparent; pointer-events: none; position: relative; }
.submit-button.is-loading .ineko-account__spinner {
  display: block; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; animation: ineko-account-spin .6s linear infinite;
}
@keyframes ineko-account-spin { to { transform: rotate(360deg); } }


.ineko-account__title { font-size: 21px; font-weight: 500; margin: 0 0 6px; }
.ineko-account__subtitle { font-size: 14px; line-height: 1.6; color: var(--oxford-solid-60, #697199); margin: 0 0 26px; }
.ineko-account__foot { font-size: 12px; color: var(--oxford-solid-40, #9ba0bb); margin-top: 18px; }
/* gate notice banner (logged out / link expired) */
.ineko-account__notice { display: flex; gap: 10px; text-align: left; border-radius: 12px; padding: 12px 14px; margin: 0 0 26px; font-size: 13px; line-height: 1.5; }
.ineko-account__notice--logout { background: #FAEEDA; border: 1px solid #EF9F27; color: #854F0B; }
.ineko-account__notice--logout strong { display: block; font-size: 14px; font-weight: 500; color: #633806; margin: 0 0 2px; }
.ineko-account__notice--error { background: #fcebeb; border: 1px solid #f0a3a3; color: #b00020; }
.ineko-account__notice-icon { flex: 0 0 auto; display: flex; margin-top: 1px; }
.ineko-account__error { color: #b00020; }

/* locked / read-only field — Variant B: padlock icon only, value stays high-contrast */
.ineko-form-field--locked .ineko-form-field__control { position: relative; }
.ineko-form-field--locked input { padding-right: 42px; cursor: not-allowed; }
.ineko-account__lock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--oxford-solid-40, #9ba0bb); pointer-events: none; display: flex; }
.ineko-account__lock svg { display: block; }

/* empty floating label reads as a subtle placeholder (same tone as the /events search field);
   the filled/focused state still floats up in --royal (css/forms.css, higher specificity). */
.ineko-account .ineko-form-field--floating .ineko-form-field__label { color: var(--oxford-solid-40, #9ba0bb); }

/* segmented code input */
.ineko-account__boxes { display: flex; gap: 8px; justify-content: center; margin: 0 0 24px; }
.ineko-account__box {
  flex: 1 1 0; min-width: 0; max-width: 54px; aspect-ratio: 1 / 1; /* square + shrinks to fit narrow screens */
  padding: 0; box-sizing: border-box; text-align: center;
  font-size: 22px; font-weight: 500; color: var(--royal, #051255);
  border: 1.5px solid var(--royal-40, #cdd0dd); border-radius: 10px; background: #fff;
}
.ineko-account__box:focus { outline: none; border-color: var(--royal, #051255); box-shadow: 0 0 0 4px rgba(8, 18, 85, .12); }
.ineko-account__box.is-filled { border-color: var(--royal, #051255); background: var(--royal-5, #f2f3f6); }
.ineko-account__code-error { color: #b00020; font-size: 13px; margin-top: 10px; text-align: center; }

/* secondary actions as links */
.ineko-account__resend { font-size: 13px; color: var(--oxford-solid-60, #697199); margin-top: 16px; text-align: center; }
.ineko-account__resend-btn, .ineko-account__back, .ineko-account__logout {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--royal, #051255);
}
.ineko-account__resend-btn { font-weight: 500; }
.ineko-account__resend-btn[disabled] { color: var(--oxford-solid-40, #9ba0bb); cursor: default; }
.ineko-account__back { display: block; margin: 10px auto 0; color: var(--oxford-solid-40, #9ba0bb); font-size: 13px; }
.ineko-account__logout { display: block; margin: 8px auto 0; color: var(--oxford-solid-60, #697199); font-size: 13px; }
