/* The face tab, styled to sit inside Frappe's own login card rather than beside it. */

.ufl-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 15px 12px;
  padding: 4px;
  background: var(--gray-100, #f4f5f6);
  border-radius: var(--border-radius, 8px);
}

.ufl-tab {
  border: 0;
  background: transparent;
  padding: 8px 6px;
  font-size: var(--text-sm, 13px);
  font-weight: 500;
  color: var(--text-muted, #6a7178);
  border-radius: var(--border-radius, 6px);
  cursor: pointer;
}
.ufl-tab.ufl-on {
  background: var(--card-bg, #fff);
  color: var(--text-color, #1f272e);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.ufl-hidden { display: none !important; }

.ufl-panel { padding: 0 15px 15px; }

/* The preview is square and mirrored, because a preview that is not mirrored feels
   backwards to anyone who has used a phone's front camera. */
.ufl-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
  border-radius: var(--border-radius, 8px);
  overflow: hidden;
  background: #11161a;
}
.ufl-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.ufl-guide {
  position: absolute;
  inset: 12% 18%;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  pointer-events: none;
}
.ufl-canvas { display: none; }

.ufl-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.ufl-action-row .ufl-action {
  flex: 1;
  min-width: 0;
  /* Bootstrap's .btn sets white-space: nowrap, which on a phone-width button
     leaves no room for "Log in with your face" or "Update your image" on one
     line - the browser then breaks wherever it must, splitting a word mid-
     letter ("F" / "ace") rather than at a space. Restoring normal wrapping
     keeps every break at a word boundary; keep-all additionally forbids
     breaking inside a word if there is any other place to break instead. */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 1.25;
  padding-top: 10px;
  padding-bottom: 10px;
}
.ufl-shutter { margin-bottom: 10px; }

.ufl-note {
  font-size: var(--text-sm, 13px);
  line-height: 1.45;
  color: var(--text-muted, #6a7178);
  min-height: 1.2em;
}
.ufl-note.ufl-bad  { color: var(--red-600, #c0392b); }
.ufl-note.ufl-good { color: var(--green-600, #1f8a4c); }

@media (prefers-color-scheme: dark) {
  .ufl-tabs { background: rgba(255, 255, 255, .06); }
  .ufl-tab.ufl-on { background: rgba(255, 255, 255, .12); color: #fff; }
}

/* Show / hide, laid out like the password tab's own field. */
.ufl-password-field { position: relative; }
.ufl-password-field .form-control { padding-right: 58px; }
.ufl-reveal {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 2px 4px;
  font-size: var(--text-sm, 13px);
  color: var(--text-muted, #6a7178);
  cursor: pointer;
}

/* The app's own loading screen, reproduced.
   White ground, the Unity mark fading in and out, a grey line underneath - the same
   screen the app shows while it signs you out. Crossing from the login page into the
   app should not look like crossing between two different products, and a navy panel
   with a spinner on it did. */
.ufl-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.ufl-curtain-inner { text-align: center; padding: 24px; }
.ufl-curtain-logo {
  width: 168px;
  max-width: 45vw;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: ufl-breathe 1.7s ease-in-out infinite;
}
.ufl-curtain-text {
  margin-top: 26px;
  font-size: 19px;
  font-weight: 600;
  color: #6b7280;
}
@keyframes ufl-breathe {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* Someone who has asked for less movement gets the mark held still. */
@media (prefers-reduced-motion: reduce) {
  .ufl-curtain-logo { animation: none; opacity: 1; }
}
}
