/* Contact widget. Two surfaces:
   1. Floating pill (bottom-right, always visible) + popover.
   2. Inline block on the login screen, rendered into a host container. */

.contact-root {
  position: fixed;
  /* Sits inside the gold L-bracket corner mark. The bracket lives at
     bottom:24/right:24 with 2px strokes that extend 40px inward, so 32/32
     keeps the pill just inside the bracket's strokes without colliding
     with the corner. */
  bottom: 32px;
  right: 32px;
  z-index: 1500;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  font: inherit;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.contact-pill:hover {
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  transform: translateY(-1px);
}
.contact-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 24%, transparent);
}

.contact-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}
.contact-popover[hidden] { display: none; }

.contact-popover__close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.12s;
}
.contact-popover__close:hover {
  color: var(--text-primary);
  background: color-mix(in oklab, var(--text-secondary) 14%, transparent);
}

.contact-popover__eyebrow,
.contact-inline__eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-popover__name,
.contact-inline__name {
  font-family: 'Saira Condensed', 'DM Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.05;
  margin-bottom: 4px;
}
.contact-popover__credential,
.contact-inline__credential {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.contact-popover__body,
.contact-inline__body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.contact-popover__actions,
.contact-inline__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.12s ease;
}
.contact-link:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.contact-link--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.contact-link--primary:hover {
  background: var(--accent-hover, var(--accent));
  color: var(--bg);
  opacity: 0.92;
}
.contact-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: color-mix(in oklab, currentColor 12%, transparent);
  font-size: 12px;
  font-weight: 700;
}
.contact-link--primary .contact-link__icon {
  background: color-mix(in oklab, var(--bg) 24%, transparent);
}
.contact-link__label { flex: 1; font-weight: 500; }
.contact-link__ext {
  font-size: 14px;
  color: inherit;
  opacity: 0.65;
}

/* Inline (login-screen) block reuses .contact-link styles via renderInline. */
.contact-inline {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-top: 2rem;
  text-align: left;
}

/* On narrow viewports, shorten the pill label to just the icon and tuck it
   inside the smaller (28px) mobile L-bracket. */
@media (max-width: 480px) {
  .contact-root { bottom: 24px; right: 24px; }
  .contact-pill__text { display: none; }
  .contact-pill { padding: 8px 10px; }
}
