/* ============================================================
   Planty Login — Tab-Switcher + OTP-Input
   ============================================================ */

/* --- Tab switcher ----------------------------------------- */
.planty-login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--md3-outline-variant, #e2eae6);
}

.planty-login-tabs .planty-login-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--md3-on-surface-variant, #3c4440);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.planty-login-tabs .planty-login-tab:hover {
  color: var(--md3-on-surface, #171D1B);
}

.planty-login-tabs .planty-login-tab.active {
  color: var(--md3-on-surface, #171D1B);
  border-bottom-color: var(--md3-primary, #007A5A);
}

/* --- OTP input group -------------------------------------- */
.otp-input-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.25rem 0 1.75rem;
}

.otp-input-group .form-item {
  margin: 0;
  flex: 1 1 0;
  max-width: 3rem;
}

.otp-input-group .form-item label {
  /* Visually hidden but accessible */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.otp-input-group .form-text.otp-digit {
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0;
  border: 2px solid var(--md-sys-color-outline, #79747e);
  border-radius: 0.75rem;
  background: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-on-surface, #1c1b1f);
  transition: border-color 0.15s, box-shadow 0.15s;
  caret-color: transparent;
  /* Prevent iOS zoom */
  font-size: max(1.5rem, 16px);
}

.otp-input-group .form-text.otp-digit:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #007A5A);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary, #007A5A) 20%, transparent);
}

/* Filled digit: only change border, never override background/color —
   avoids the light-background-on-dark-mode contrast trap. */
.otp-input-group .form-text.otp-digit:not(:placeholder-shown) {
  border-color: var(--md-sys-color-primary, #007A5A);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .otp-input-group .form-text.otp-digit {
    background: var(--md-sys-color-surface-container-highest, #36343b);
    border-color: var(--md-sys-color-outline, #938f99);
    color: var(--md-sys-color-on-surface, #e6e1e5);
  }
}

/* Separator between groups of 3 (optional visual hint) */
.otp-input-group .otp-sep {
  display: flex;
  align-items: center;
  color: var(--md-sys-color-outline, #79747e);
  font-size: 1.25rem;
  padding: 0 0.125rem;
}
