/* Shared Catalog Studio chrome. Colours/type come from the Nook style guide;
   component shapes and environment warning colours reuse the existing Studio. */
:root {
  --bg: #f4f1ed;
  --card: #fff;
  --ink: #1e1e1e;
  --sub: #6e635b;
  --line: #c8b8aa;
  --accent: #b0492a;
}
html {
  scrollbar-gutter: stable;
}
body.studio-page {
  margin: 0;
  font: 15px/1.5 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
header.studio-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0;
  margin: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.studio-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.8rem 1.2rem 0.65rem;
}
.studio-header .env {
  position: absolute;
  top: 0.25rem;
  right: 0.7rem;
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sub);
  background: var(--bg);
}
.studio-header .env.dev {
  background: #e3f2e8;
  color: #2e7d52;
}
.studio-header .env.prod {
  background: #fbe4e4;
  color: #b23c3c;
}
.studio-header .env.test {
  background: #eef;
  color: #4a4ab2;
}
.studio-header .tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
}
.studio-header .tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--sub);
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.studio-header [data-settings-nav] svg {
  display: block;
  flex: none;
}
.studio-header .tab:hover {
  background: var(--bg);
  color: var(--ink);
}
.studio-header .tab.active {
  background: var(--accent);
  color: #fff;
}
.studio-header .tab[hidden] {
  display: none !important;
}
.studio-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#studio-content {
  scroll-margin-top: 12rem;
}
.studio-skip {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem;
  color: var(--accent);
  background: var(--card);
}
.studio-skip:focus {
  top: 1rem;
}
.studio-product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}
.studio-product-links:empty {
  display: none;
}
.studio-page .studio-product-link {
  display: inline-block;
  font-size: 0.7rem;
  line-height: 1.5;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--accent);
  background: var(--card);
}
.studio-page .studio-product-link:hover {
  background: var(--bg);
}
.studio-page .studio-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0.2rem 0;
  white-space: nowrap;
}
.studio-sort-note {
  caption-side: bottom;
  text-align: left;
  color: var(--sub);
  font-size: 0.75rem;
  padding: 0.5rem;
}
.bitem .bselect {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
}
@media (max-width: 900px) {
  .studio-header .tab {
    padding: 0.35rem 0.5rem;
  }
}
@media (max-width: 600px) {
  .studio-header-inner {
    padding: 1.8rem 0.7rem 0.65rem;
  }
  .studio-header .tab {
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
  }
}
@media print {
  header.studio-header,
  .studio-skip,
  .studio-product-links {
    display: none;
  }
}
