/**
 * Platform nav controls — explicit sizing so @2x4m/ui Tailwind utilities
 * (h-3.5, h-5, etc.) do not need to appear in every app CSS bundle.
 */

:root {
  --platform-nav-height: 3.5rem;
  --platform-nav-control-height: 2rem;
}

.nav-search-trigger svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/*
 * Keep search + day-part + auth + BEVEL + cart on the same optical height
 * everywhere (market, products, platform, shop, agents, loops).
 */
.nav-actions .nav-search-trigger,
.nav-actions .day-night-badge,
.nav-actions .session-auth-button,
.nav-actions .nav-bevel-link,
.nav-actions .nav-cart-button {
  height: var(--platform-nav-control-height) !important;
  max-height: var(--platform-nav-control-height) !important;
  min-height: var(--platform-nav-control-height) !important;
  box-sizing: border-box;
  padding-block: 0 !important;
  line-height: 1 !important;
}

/* ---------- Shop cart pill ---------- */
.nav-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: var(--platform-nav-control-height);
  max-height: var(--platform-nav-control-height);
  line-height: 1;
  border-radius: 9999px;
  padding: 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 2px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 3px 3px 0 0 color-mix(in srgb, #2563eb 55%, #18181b);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.nav-cart-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 color-mix(in srgb, #2563eb 55%, #18181b);
  filter: brightness(1.05);
}

.nav-cart-button svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* ---------- BEVEL nav pill (agents surface) ---------- */
.nav-bevel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--platform-nav-control-height);
  max-height: var(--platform-nav-control-height);
  line-height: 1;
  border-radius: 9999px;
  padding: 0 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--border, #18181b);
  background: var(--surface, #ffffff);
  color: var(--ink, #18181b);
  box-shadow: 3px 3px 0 0 var(--border-shadow, #18181b);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.nav-bevel-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--border-shadow, #18181b);
  background: var(--ink, #18181b);
  color: var(--cream, #fafaf9);
  text-decoration: none;
}

.nav-bevel-link--active {
  background: var(--ink, #18181b);
  color: var(--cream, #fafaf9);
  border-color: var(--ink, #18181b);
}

.nav-bevel-link--active:hover {
  filter: brightness(1.08);
}

/* ---------- Session auth (sign in / signed-in menu) ---------- */
.session-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: var(--platform-nav-control-height);
  max-height: var(--platform-nav-control-height);
  line-height: 1;
  border-radius: 9999px;
  padding: 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--border, #18181b);
  background: var(--ink, #18181b);
  color: var(--cream, #fafaf9);
  box-shadow: 3px 3px 0 0 var(--border-shadow, #18181b);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
  cursor: pointer;
}

.session-auth-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--border-shadow, #18181b);
  color: var(--cream, #fafaf9);
  text-decoration: none;
}

.session-auth-button svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.session-auth-button--signed-in {
  background: var(--surface, #ffffff);
  color: var(--ink, #18181b);
}

.session-auth-button--signed-in:hover {
  background: var(--ink, #18181b);
  color: var(--cream, #fafaf9);
}

.session-auth-button--loading {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #71717a;
  text-transform: none;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: normal;
  cursor: default;
  padding-inline: 0.5rem;
}

.session-auth-button--loading:hover {
  transform: none;
  box-shadow: none;
}

.session-auth-spinner {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border-radius: 9999px;
  border: 2px solid #a1a1aa;
  border-top-color: transparent;
  animation: session-auth-spin 0.8s linear infinite;
}

@keyframes session-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.session-auth-menu {
  position: absolute;
  right: 0;
  z-index: 50;
  margin-top: 0.5rem;
  width: 16rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 2px solid var(--border, #e4e4e7);
  background: var(--surface, #ffffff);
  box-shadow: 6px 6px 0 0 var(--border-shadow, #e4e4e7);
}

.session-auth-menu-header {
  border-bottom: 1px solid var(--border, #e4e4e7);
  padding: 1rem;
}

.session-auth-menu-actions {
  padding: 0.5rem;
}

.session-auth-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink, #3f3f46);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.session-auth-menu-item:hover {
  background: var(--surface-muted, #f4f4f5);
}

.session-auth-menu-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/*
 * Command palette — pin Heroicon sizes so SVGs never flex-grow and
 * collapse the title column (giant arrow / stacked title text).
 * Loaded via PlatformChrome link tags on every surface.
 */
.command-item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 100%;
  box-sizing: border-box;
}

.command-item-icon {
  flex-shrink: 0 !important;
}

.command-item-icon svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  max-width: 1.25rem !important;
  max-height: 1.25rem !important;
  flex-shrink: 0 !important;
}

.command-item-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden;
}

.command-item-title,
.command-item-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-item-arrow {
  margin-left: auto !important;
  flex-shrink: 0 !important;
  width: 1rem !important;
  height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
}

.command-search-icon {
  width: 1.25rem !important;
  height: 1.25rem !important;
  flex-shrink: 0 !important;
}

.command-preview-calculator-icon svg {
  width: 2rem !important;
  height: 2rem !important;
}