/* Shared chrome for every pointer.bet app. Colors come from /suite/tokens.css. */

.site-header,
.suite-footer,
.suite-about {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  box-sizing: border-box;
  height: var(--suite-header-height, 72px);
  min-height: var(--suite-header-height, 72px);
  padding: var(--suite-header-pad-y, 16px) var(--suite-header-pad-x, 24px);
  background: var(--header-bg, var(--topbar));
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
}

.site-header button,
.site-header input,
.suite-footer button,
.suite-about button {
  font-family: inherit;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: var(--text);
}

.site-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Square mark. Keep border-radius at 0 so every app shows the same glyph. */
.site-brand svg,
.site-brand img {
  display: block;
  width: var(--suite-logo-size, 32px);
  height: var(--suite-logo-size, 32px);
  flex: none;
  border-radius: 0;
}

.site-header-nav,
.site-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.site-header-nav {
  margin-left: auto;
  flex: none;
}

.site-header a {
  text-decoration: none;
}

.site-header-link,
.suite-signin {
  display: inline-flex;
  align-items: center;
  min-height: var(--suite-nav-min-height, 40px);
  text-decoration: none;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--nav);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  background: transparent;
}

button.site-header-link {
  border: 0;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  gap: 6px;
}

.site-header-link:hover,
.pro-thanks-button[aria-expanded='true'],
.suite-apps-button[aria-expanded='true'],
.account-button[aria-expanded='true'] {
  color: var(--nav-active);
  background: var(--nav-hover);
}

.suite-apps {
  position: relative;
}

.suite-apps-button {
  display: none;
  gap: 6px;
}

.suite-apps.is-menu .suite-apps-button {
  display: inline-flex;
}

.suite-apps-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.suite-apps-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(70vh, 420px);
  overflow: auto;
  margin: 0;
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 12px 32px var(--shadow);
  color: var(--text);
}

.suite-apps-menu[hidden] {
  display: none !important;
}

.suite-apps-heading {
  margin: 4px 8px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.suite-apps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.suite-apps-empty {
  display: block;
  margin: 0;
  padding: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.suite-apps-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

a.suite-apps-item:hover {
  background: var(--nav-hover);
  color: var(--nav-active);
}

.suite-apps-mark,
.suite-apps-item img,
.suite-apps-item svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 0;
}

.suite-apps-name {
  min-width: 0;
}

.suite-apps-status {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.suite-apps-about {
  display: none;
}

.pro-thanks-wrap,
.suite-account {
  position: relative;
}

.pro-thanks-button svg,
.pro-star {
  display: block;
  width: 14px;
  height: 14px;
  flex: none;
}

.pro-thanks,
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 12px 32px var(--shadow);
  color: var(--text);
}

.pro-thanks {
  width: max-content;
  max-width: 240px;
  padding: var(--space-12) var(--space-16);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.account-menu {
  min-width: 260px;
  padding: var(--space-16);
}

.account-menu-title {
  margin: 0 0 var(--space-4);
  font-weight: 700;
  color: var(--text);
}

.account-menu-note {
  margin: 0 0 var(--space-12);
  color: var(--text-muted);
  font-size: 13px;
}

.account-menu-link,
.suite-signout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin: 0 0 var(--space-8);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
  font-size: 14px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--surface);
  min-inline-size: 0;
}

.theme-switch legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-switch label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-switch label:has(input:checked) {
  background: var(--nav-hover);
  color: var(--text);
  font-weight: 700;
}

.theme-switch label:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  border-radius: 999px;
  color: var(--text);
}

.account-button img,
.suite-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.suite-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
}

.suite-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 24px 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.suite-footer p {
  margin: 0;
}

.suite-footer a {
  color: var(--nav);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.suite-about {
  color: var(--text);
}

.suite-about h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.suite-about h2 {
  margin: 32px 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.suite-about h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
}

.suite-about h4 {
  margin: 16px 0 4px;
  font-size: 16px;
}

.suite-about p,
.suite-about li {
  font-size: 16px;
  line-height: 1.5;
}

.suite-lede {
  max-width: 68ch;
  margin: 0 0 8px;
}

.suite-about a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.suite-app {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 12px;
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.suite-app .suite-mark {
  grid-row: span 4;
  width: 32px;
  height: 32px;
}

.suite-app p {
  margin: 0;
}

.suite-status {
  color: var(--text-muted);
  font-size: 14px;
}

.suite-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.suite-plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.suite-plan ul {
  margin: 0;
  padding-left: 1.2em;
}

.suite-credits {
  margin: 0;
  padding-left: 1.2em;
}

.suite-credits li {
  margin: 0 0 12px;
}

.suite-credit-license {
  color: var(--text-muted);
}

.suite-version {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.suite-footer a:focus-visible,
.suite-footer button:focus-visible,
.suite-apps-menu a:focus-visible,
.suite-about a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .site-header {
    gap: 8px;
    padding: 16px;
    flex-wrap: nowrap;
  }

  .site-header-about,
  .suite-apps-direct {
    display: none;
  }

  .suite-apps-button {
    display: inline-flex;
  }

  .suite-apps-menu:not([hidden]) .suite-apps-about {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin-top: 4px;
    padding: 4px 8px;
    border-top: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
  }

  .suite-apps-menu:not([hidden]) .suite-apps-about:hover {
    background: var(--nav-hover);
    color: var(--nav-active);
  }
}
