/* =========================================================================
   OEDash shell — header, navigation drawer, footer (rendered by shell.js).
   All classes are shell-* so nothing collides with page CSS or ds-kit.
   Tokens from ds-kit/colors_and_type.css; --dash-radius-* from controls.css.
   ========================================================================= */
.shell-icon { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.shell-icon--sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* ---------- Status tags (light surfaces; dark variant inside the drawer) ---------- */
.shell-tag {
  display: inline-block; flex-shrink: 0;
  font-family: var(--oe-font-mono); font-size: var(--dash-fs-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.5;
  padding: 1px 8px; border-radius: var(--dash-radius-pill); border: 1px solid transparent; white-space: nowrap;
}
.shell-tag--live  { background: var(--oe-bluette-700); color: var(--oe-white); }
.shell-tag--nuovo { background: var(--oe-bluette-050); color: var(--oe-bluette-700); border-color: var(--oe-bluette-100); }
.shell-tag--soon  { background: var(--oe-gray-100); color: var(--oe-gray-600); border-color: var(--oe-gray-200); }
.shell-drawer .shell-tag--live  { background: var(--oe-white); color: var(--oe-bluette-900); }
.shell-drawer .shell-tag--nuovo { background: transparent; color: var(--oe-white); border-color: rgba(255,255,255,.6); }
.shell-drawer .shell-tag--soon  { background: transparent; color: rgba(255,255,255,.7); border: 1px dashed rgba(255,255,255,.4); }
.shell-beta {
  font-family: var(--oe-font-mono); font-size: var(--dash-fs-xs); font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0 7px; border: 1px solid rgba(255,255,255,.5); border-radius: var(--dash-radius-pill);
  margin-left: 4px; vertical-align: 1px;
}

/* ---------- Header ---------- */
.shell-header {
  background: var(--oe-bluette-900);
  padding: var(--oe-space-5) var(--oe-space-7);
  position: sticky;
  top: 0;
  z-index: 300;   /* above page content + popovers (200); below scrim/drawer */
}
.shell-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;          /* actions drop to a second row instead of overflowing */
  align-items: center;
  gap: var(--oe-space-3) var(--oe-space-6);
}
.shell-header__logo { flex-shrink: 0; display: block; border-radius: var(--dash-radius-control); }
.shell-header__logo:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 4px; }
.shell-header__logo-img { height: 32px; width: auto; display: block; }
.shell-header__title {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: break-word;
  font-family: var(--oe-font-serif);
  font-weight: 400;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.2;
  color: var(--oe-white);
  margin: 0;
}
.shell-header--home .shell-header__title {
  font-size: 20px;
  padding-left: var(--oe-space-6);
  border-left: 1px solid rgba(255,255,255,.3);
}
.shell-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--oe-space-3) var(--oe-space-6);
  margin-left: auto;
  min-width: 0;
}

.shell-burger {
  flex-shrink: 0; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(255,255,255,.4); border-radius: var(--dash-radius-control);
  color: var(--oe-white); cursor: pointer; padding: 0;
}
.shell-burger:hover { background: rgba(255,255,255,.1); }
.shell-burger:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 2px; }

/* ---------- Drawer ---------- */
.shell-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); z-index: 600;
  overflow-y: auto; box-shadow: 8px 0 24px rgba(0,0,0,.25);
  background: var(--oe-bluette-900); color: var(--oe-white); font-family: var(--oe-font-sans);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .22s ease, visibility 0s linear .22s;
}
.shell-drawer.is-open { transform: none; visibility: visible; transition: transform .22s ease; }
.shell-drawer a { color: inherit; text-decoration: none; }
.shell-drawer :focus-visible { outline: 2px solid var(--oe-white); outline-offset: -2px; }
.shell-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 12px 16px 18px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.shell-drawer__logo-img { height: 20px; width: auto; display: block; }
.shell-iconbtn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--oe-white); cursor: pointer; border-radius: var(--dash-radius-control); padding: 0;
}
.shell-iconbtn:hover { background: rgba(255,255,255,.1); }

.shell-scrim {
  position: fixed; inset: 0; z-index: 450; background: rgba(20,0,50,.35);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.shell-scrim.is-open { opacity: 1; visibility: visible; transition: opacity .2s ease; }

.shell-tree, .shell-tree ul { list-style: none; margin: 0; padding: 0; }
.shell-tree { padding: 8px 0 24px; }
.shell-tree__row {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 16px 0 18px; font-size: var(--dash-fs-lg); font-weight: 500;
}
.shell-tree__home { margin: 0 12px 8px 6px; padding-left: 12px; border-radius: var(--dash-radius-control); }
.shell-tree__home:hover { background: rgba(255,255,255,.08); }
.shell-tree__name { flex: 1; }
.shell-tree__domain { margin-bottom: 6px; }
.shell-tree__domain.is-soon .shell-tree__row { opacity: .5; cursor: default; }
.shell-tree .shell-tree__tools { padding-left: 38px; }   /* tool text lines up with the domain name */
.shell-tree__tool {
  display: block; padding: 7px 12px; margin: 0 12px 2px 0; font-size: var(--dash-fs-lg);
  border-radius: var(--dash-radius-control);
}
.shell-drawer .shell-tree__tool { color: rgba(255,255,255,.85); }
.shell-drawer .shell-tree__tool:hover { background: rgba(255,255,255,.08); color: var(--oe-white); }
.shell-drawer .shell-tree__tool[aria-current="page"] {
  background: rgba(255,255,255,.14); color: var(--oe-white); font-weight: 600;
}

/* ---------- Footer ---------- */
.shell-footer {
  background: var(--oe-bluette-900);
  color: var(--oe-white);
  padding: var(--oe-space-10) var(--oe-space-7) var(--oe-space-6);
}
.shell-footer__top {
  max-width: 1400px; margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--oe-space-4);
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: var(--oe-space-6);
}
.shell-footer__logo { height: 36px; width: auto; display: block; align-self: flex-start; }
.shell-footer__tagline {
  font-family: var(--oe-font-serif); font-size: 18px; font-weight: 400; line-height: 1.5;
  color: var(--oe-white); margin: 0; max-width: 600px;
}
.shell-footer__bar {
  max-width: 1400px; margin: var(--oe-space-5) auto 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--oe-space-3);
  font-size: var(--dash-fs-md); color: rgba(255,255,255,.85);
}
.shell-footer__bar a { color: inherit; text-decoration: none; }
.shell-footer__bar a:hover { text-decoration: underline; }
.shell-footer__bar a:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 2px; border-radius: var(--dash-radius-inner); }
.shell-footer__links { display: flex; gap: var(--oe-space-6); }

/* ---------- Phone: stack title and actions on their own rows, never scroll sideways ---------- */
@media (max-width: 720px) {
  .shell-header { position: static; padding-left: var(--oe-space-4); padding-right: var(--oe-space-4); }
  .shell-header__inner { gap: var(--oe-space-3) var(--oe-space-4); }
  .shell-header__title { flex-basis: 100%; }
  .shell-header--home .shell-header__title { flex-basis: auto; font-size: 16px; padding-left: var(--oe-space-4); }
  .shell-header__actions { flex-basis: 100%; margin-left: 0; gap: var(--oe-space-3); }
  .shell-footer { padding-left: var(--oe-space-4); padding-right: var(--oe-space-4); }
}
@media (max-width: 480px) {
  .shell-header__logo-img { height: 24px; }
  .shell-burger { width: 36px; height: 36px; }
}
@media (max-width: 360px) {
  .shell-header__logo-img { height: 20px; }
  .shell-header__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .shell-drawer, .shell-scrim { transition: none; }
}
