* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--spt-ink);
  font-family: var(--spt-font-sans);
  background: var(--spt-workspace);
}

button {
  font: inherit;
}

.spt-app-shell {
  display: grid;
  grid-template-rows: minmax(var(--spt-header-height), auto) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  background: var(--spt-workspace);
}

.spt-header {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, auto) auto minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 28px;
  min-width: 0;
  min-height: var(--spt-header-height);
  padding: 0 22px;
  background: var(--spt-header-bg);
  border-bottom: 1px solid var(--spt-border-strong);
}

.spt-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  flex: 0 1 auto;
}

.spt-brand__logo {
  width: var(--spt-icon-size);
  height: var(--spt-icon-size);
  object-fit: contain;
  flex: 0 0 auto;
}

.spt-brand__name {
  overflow: hidden;
  color: var(--spt-ink);
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spt-menu-bar {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
}

.spt-customer-product-page-link {
  display: inline-flex;
  align-items: center;
  height: var(--spt-control-height);
  padding: 0 10px;
  color: var(--spt-ink-soft);
  font-size: 14px;
  line-height: var(--spt-control-height);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--spt-radius);
}

.spt-customer-product-page-link:hover {
  color: var(--spt-ink);
  background: var(--spt-menu-hover);
  border-color: var(--spt-border);
}

.spt-customer-product-page-link:focus-visible {
  outline: 2px solid var(--spt-focus);
  outline-offset: 2px;
}

.spt-menu {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.spt-menu__button {
  height: var(--spt-control-height);
  min-width: 56px;
  padding: 0 14px;
  color: var(--spt-ink-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: var(--spt-control-height);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--spt-radius);
  cursor: default;
}

.spt-menu__button:hover,
.spt-menu__button[aria-expanded="true"] {
  color: var(--spt-ink);
  background: var(--spt-menu-hover);
  border-color: var(--spt-border);
}

.spt-menu__panel {
  position: absolute;
  top: calc(50% + 17px);
  left: 0;
  z-index: 90;
  width: 176px;
  padding: 6px;
  background: var(--spt-surface-raised);
  border: 1px solid var(--spt-border-strong);
  border-radius: var(--spt-radius);
  box-shadow: var(--spt-shadow-soft);
}

.spt-menu__item {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 10px;
  color: var(--spt-ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: default;
}

.spt-menu__item:hover {
  background: var(--spt-menu-hover);
}

.spt-menu__button:focus-visible,
.spt-menu__item:focus-visible {
  outline: 2px solid var(--spt-focus);
  outline-offset: 2px;
}

.spt-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.spt-header-tools:empty {
  display: none;
}

.spt-app-status-region {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 5px;
}

.spt-app-status-region[hidden] {
  display: none;
}

.spt-app-status {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--spt-ink-soft);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spt-app-status__info {
  display: inline-grid;
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--spt-ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: var(--spt-surface);
  border: 1px solid var(--spt-border-strong);
  border-radius: 50%;
  cursor: default;
  flex: 0 0 auto;
  place-items: center;
}

.spt-app-status__info:hover,
.spt-app-status__info[aria-expanded="true"] {
  color: var(--spt-ink);
  background: var(--spt-menu-hover);
}

.spt-app-status__info:focus-visible {
  outline: 2px solid var(--spt-focus);
  outline-offset: 2px;
}

.spt-app-status__details {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 95;
  width: min(330px, calc(100vw - 28px));
  padding: 10px 12px;
  color: var(--spt-ink);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  background: var(--spt-surface-raised);
  border: 1px solid var(--spt-border-strong);
  border-radius: var(--spt-radius);
  box-shadow: var(--spt-shadow-soft);
  transform: translateX(-50%);
}

.spt-app-status__details[hidden] {
  display: none;
}

.spt-app-status__details-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
}

.spt-app-status__details-explanation {
  margin: 0;
}

.spt-app-status__details-suggestions {
  margin: 7px 0 0;
  padding-left: 18px;
}

.spt-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--spt-workspace);
}

.spt-workspace__surface {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 28px;
  place-items: center;
}

.spt-window-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

@media (max-width: 520px) {
  .spt-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 16px;
    padding: 10px 14px;
  }

  .spt-brand__name {
    max-width: 190px;
    font-size: 17px;
  }

  .spt-menu__panel {
    left: auto;
    right: 0;
  }

  .spt-header-tools {
    grid-column: 1 / -1;
  }

  .spt-app-status-region {
    position: absolute;
    right: 14px;
    bottom: 2px;
    left: 14px;
    pointer-events: none;
  }

  .spt-app-status__info,
  .spt-app-status__details {
    pointer-events: auto;
  }

  .spt-workspace__surface {
    padding: 14px;
    place-items: end center;
  }
}
