.lumi-morph-control {
  align-items: center;
  gap: 7px;
}

button.lumi-morph-control,
a.lumi-morph-control,
.layui-btn.lumi-morph-control {
  display: inline-flex;
  justify-content: center;
}

.lumi-morph-icon {
  width: 1.05em;
  height: 1.05em;
  min-width: 1.05em;
  overflow: visible;
  color: currentColor;
  pointer-events: none;
  transform-origin: 50% 50%;
}

.lumi-morph-label {
  min-width: 0;
}

.lumi-morph-original-icon {
  display: none !important;
}

.lumi-morph-control.is-morph-complete .lumi-morph-icon {
  color: currentColor;
  filter: drop-shadow(0 0 5px rgba(116, 88, 210, .18));
}

.lumi-morph-control.is-morph-loading .lumi-morph-icon {
  animation: lumi-morph-breathe .9s ease-in-out infinite alternate;
}

.lumi-morph-control.is-morph-warning .lumi-morph-icon {
  color: #b45c55;
}

.lumi-password-host {
  position: relative !important;
}

.lumi-password-host > input[type="password"],
.lumi-password-host > input[type="text"][data-lumi-password-ready="1"] {
  padding-inline-end: 46px !important;
}

/* Edge/IE expose their own reveal control only after a password has text.
   Lumi already renders one accessible toggle, so keeping the native control
   would make the field appear to grow a second eye while the user types. */
.lumi-password-host > input::-ms-reveal,
.lumi-password-host > input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.lumi-password-toggle {
  position: absolute;
  z-index: 3;
  inset-inline-end: 6px;
  bottom: 4px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #887ba5;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.lumi-password-toggle:hover,
.lumi-password-toggle:focus-visible {
  color: #6f50ce;
  background: rgba(120, 87, 210, .09);
  outline: none;
}

.lumi-password-toggle .lumi-morph-icon {
  width: 18px;
  height: 18px;
}

.site-brand-mark,
.lumi-brand-mark,
.community-brand-mark,
.r2-admin-brand-mark {
  position: relative;
}

.lumi-morph-brand-icon {
  position: absolute;
  z-index: 4;
  inset: 14%;
  width: 72%;
  height: 72%;
  color: #7657df;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(111, 78, 205, .25));
  transition: opacity .18s ease;
}

.lumi-morph-brand-ready > img {
  transition: opacity .18s ease, transform .28s ease;
}

.lumi-morph-brand-ready.is-lumi-brand-morphing > img {
  opacity: .14;
  transform: scale(.92);
}

.lumi-morph-brand-ready.is-lumi-brand-morphing > .lumi-morph-brand-icon {
  opacity: 1;
}

.r2-admin-nav-item .lumi-morph-icon,
.r2-admin-icon-button .lumi-morph-icon {
  width: 17px;
  height: 17px;
}

.r2-admin-user-button .lumi-morph-icon {
  width: 15px;
  height: 15px;
}

@keyframes lumi-morph-breathe {
  from { opacity: .55; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .lumi-morph-control { gap: 6px; }
  .lumi-password-toggle { inset-inline-end: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .lumi-morph-control.is-morph-loading .lumi-morph-icon { animation: none; }
  .lumi-password-toggle,
  .lumi-morph-brand-icon,
  .lumi-morph-brand-ready > img { transition: none; }
}
