/* ============================================================
   Terraliti — Auth widget
============================================================ */

.auth-root {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #ededeb;
  font-family: inherit;
}

/* GIS slot -------------------------------------------------- */

.auth-gsi-slot {
  min-height: 40px;
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}

.auth-gsi-slot iframe {
  max-width: 100%;
  color-scheme: normal;
}

.auth-fallback {
  padding: 9px 14px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #ededeb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.auth-fallback:hover {
  border-color: #555;
  background: #141414;
}

/* User chip ------------------------------------------------ */

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 4px 9px 4px 4px;

  background: #0d0d0d;
  border: 1px solid #262626;

  color: #ddd;

  font-size: 12px;
  font-weight: 500;
  font-family: inherit;

  cursor: pointer;

  transition: border-color .2s ease, background .2s ease;
}

.auth-chip:hover {
  border-color: #444;
  background: #121212;
}

.auth-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #1c1c1c;
  flex-shrink: 0;
}

.auth-avatar-lg {
  width: 34px;
  height: 34px;
}

.auth-avatar-fallback {
  display: grid;
  place-items: center;
  color: #cfcfcf;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-chevron {
  color: #666;
  flex-shrink: 0;
}

/* Dropdown menu ------------------------------------------- */

.auth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;

  min-width: 240px;

  background: #0a0a0a;
  border: 1px solid #262626;

  box-shadow: 0 20px 60px rgba(0, 0, 0, .65);

  z-index: 500;
}

.auth-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 14px 12px;

  border-bottom: 1px solid #1a1a1a;
}

.auth-menu-id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-menu-id strong {
  font-size: 12.5px;
  font-weight: 600;
  color: #eee;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-id span {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-item {
  display: block;
  width: 100%;

  padding: 11px 14px;

  text-align: left;

  background: transparent;
  color: #bbb;

  font-size: 12px;
  font-family: inherit;

  cursor: pointer;

  transition: background .15s ease, color .15s ease;
}

.auth-menu-item:hover {
  background: #141414;
  color: #fff;
}

/* Skeleton ------------------------------------------------- */

.auth-skeleton {
  width: 130px;
  height: 34px;
  background: #111;
  animation: auth-pulse 1.4s ease-in-out infinite;
}

@keyframes auth-pulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}

/* Compact (mobile) ---------------------------------------- */

.auth-root.auth-compact .auth-name,
.auth-root.auth-compact .auth-chevron {
  display: none;
}

.auth-root.auth-compact .auth-chip {
  padding: 4px;
  gap: 0;
}

.auth-root.auth-compact .auth-menu {
  min-width: 220px;
}