@import "./tokens.css";

.pd-global-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid var(--pd-border);
  background: var(--pd-canvas);
}

.pd-global-header-inner {
  display: flex;
  width: min(100% - 48px, 1500px);
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.pd-global-header-nav {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
}

.pd-global-header-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--pd-ink);
  font: 600 15px/1.2 var(--pd-font-sans);
  text-decoration: none;
  white-space: nowrap;
}

.pd-global-header-link:hover {
  color: var(--pd-accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--pd-accent);
  text-underline-offset: 5px;
}

.pd-workbench-identity {
  display: inline-flex;
  min-width: 0;
  flex: none;
  align-items: center;
  gap: 13px;
}

.pd-platform-home {
  display: inline-flex;
  align-items: baseline;
  color: var(--pd-ink);
  text-decoration: none;
  white-space: nowrap;
}

.pd-platform-home:hover { opacity: .82; }

.pd-wordmark {
  font: 700 25px/1 var(--pd-font-sans);
  letter-spacing: -.075em;
}

.pd-wordmark-slash { padding: 0 2px; color: var(--pd-accent); }

.pd-workbench-label {
  overflow: hidden;
  max-width: 27vw;
  padding-left: 13px;
  border-left: 1px solid var(--pd-border);
  color: var(--pd-ink-soft);
  font: 600 13px/1.25 var(--pd-font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-directory-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--pd-ink-soft);
  border-bottom: 1px solid var(--pd-border);
  font: 600 12px/1 var(--pd-font-sans);
  text-decoration: none;
  white-space: nowrap;
}

.pd-directory-link:hover { color: var(--pd-accent-strong); border-color: var(--pd-accent); }

@media (max-width: 600px) {
  .pd-global-header-inner {
    width: calc(100% - 32px);
    min-height: 68px;
    gap: 10px;
  }
  .pd-global-header-nav { gap: 14px; }
  .pd-global-header-link { min-height: 32px; font-size: 13px; }
  .pd-workbench-identity { gap: 8px; }
  .pd-wordmark { font-size: 22px; }
  .pd-workbench-label { max-width: 26vw; padding-left: 8px; font-size: 11px; }
  .pd-directory-link { min-height: 30px; font-size: 11px; }
}

@media (max-width: 380px) {
  .pd-global-header-inner { width: calc(100% - 24px); gap: 8px; }
  .pd-global-header-nav { gap: 12px; }
  .pd-global-header-nav .pd-global-header-link:last-child { display: none; }
  .pd-workbench-identity { gap: 6px; }
  .pd-wordmark { font-size: 20px; }
  .pd-workbench-label { max-width: 25vw; padding-left: 6px; font-size: 10px; }
}
