/* XHub auth / profile / notifications — red black white */

.xam-auth-slot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.xam-login-btn {
  font-size: 0.78rem !important;
  padding: 0.45rem 0.75rem !important;
  white-space: nowrap;
}

.xam-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 140px;
}
.xam-user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 0, 0, 0.55);
}
.xam-user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-site-theme="light"] .xam-user-chip {
  background: rgba(255, 255, 255, 0.75);
  color: #111;
  border-color: rgba(0, 0, 0, 0.12);
}

.xam-bell {
  position: relative;
}
.xam-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff0000;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}
.xam-bell.has-badge {
  color: #ff4d4d;
}

.xam-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.xam-modal.hidden { display: none; }
.xam-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.xam-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #0a0a0a;
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 2px solid #ff0000;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.xam-card h2 {
  font-family: var(--font-display, 'Fredoka', system-ui, sans-serif);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}
.xam-lead {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin: 0 0 0.85rem;
}
.xam-card--crop { width: min(380px, 100%); }
.xam-crop-stage {
  display: grid;
  place-items: center;
  margin: 0.5rem 0 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 0, 0, 0.35);
  touch-action: none;
}
.xam-crop-stage canvas { display: block; max-width: 100%; cursor: grab; }
.xam-zoom-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.75rem;
}
.xam-avatar-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.xam-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff0000;
  background: #111;
}
.xam-file-btn { cursor: pointer; }
.xam-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.xam-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}
.xam-error.hidden { display: none; }
.xam-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.xam-link {
  color: #ff6b6b;
  text-decoration: none;
  font-size: 0.9rem;
  word-break: break-all;
}
.xam-link:hover { text-decoration: underline; color: #ff0000; }

.xam-panel {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 11000;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 2px solid #ff0000;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.xam-panel.hidden { display: none; }
.xam-panel h3 {
  font-family: var(--font-display, 'Fredoka', system-ui, sans-serif);
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
}
.xam-req {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.xam-req-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}
.xam-req-head img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.xam-req-actions { display: flex; gap: 0.4rem; }

/* Public header: never show guest/Google account chrome (avatar, bell, reset) */
.dx-nav .xam-auth-slot,
.dx-nav #xhub-auth-slot,
.dx-nav #xhub-bell,
.dx-nav #xhub-user-chip,
.dx-nav #xhub-logout-btn,
.xam-auth-slot,
#xhub-auth-slot,
#xhub-bell,
#xhub-user-chip,
#xhub-logout-btn {
  display: none !important;
}

@media (max-width: 720px) {
  .xam-user-chip span { display: none; }
  .xam-login-btn { padding: 0.4rem 0.55rem !important; }
}
