/* Three samples in one browser window: Chrome-style tab groups, the Tether side panel
   and the pages of the Order and Lamp samples. All sites here are fictional. */

/* ---- Tab groups ------------------------------------------------------------------ */
/* The chips form one tablist. Its box is dropped so each chip sits beside its own tabs. */
.scout-tabs .demo-groups { display: contents; }
.scout-tabs .window-controls { order: 0; }
#group-dinner { order: 1; }
.scout-tabs .tab-group[data-group="dinner"] { order: 2; }
#group-order { order: 3; }
.scout-tabs .tab-group[data-group="order"] { order: 4; }
#group-lamp { order: 5; }
.scout-tabs .tab-group[data-group="lamp"] { order: 6; }
.scout-tabs .tab-group[hidden] { display: none; }

.group-chip { --group: #1a73e8; --group-soft: #d3e3fd; --group-ink: #0b4fb3; }
.group-chip[data-group="order"] { --group: #e8710a; --group-soft: #fde3cc; --group-ink: #8a3a00; }
.group-chip[data-group="lamp"] { --group: #1e8e3e; --group-soft: #cfeed8; --group-ink: #0d5226; }
#session .scout-tabs .group-chip {
  flex: none;
  align-self: center;
  width: auto;
  height: 24px;
  margin: 0 3px 3px 5px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--group);
  color: var(--group-ink);
  font: 600 0.75rem/1 var(--chrome-font, var(--ui));
  text-align: center;
  cursor: pointer;
}
#session .scout-tabs .group-chip[aria-selected="true"] {
  background: var(--group-soft);
  box-shadow: none;
}
#session .scout-tabs .group-chip:hover { background: var(--group-soft); }
#session .scout-tabs .group-chip:focus-visible {
  outline: 2px solid var(--group-ink);
  outline-offset: 1px;
}
.tab-group[data-group="dinner"]::after { background: #1a73e8; }
.tab-group[data-group="order"]::after { background: #e8710a; }
.tab-group[data-group="lamp"]::after { background: #1e8e3e; }
.scout-tabs [data-demo-tab] { background: transparent; }
.scout-tabs [data-demo-tab] > i {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 19px;
  border-radius: 3px;
  background: #f3e6da;
  color: #7a2e12;
  font: 600 13px/1 Georgia, serif;
}
.tab-group[data-group="lamp"] [data-demo-tab] > i { background: #e4efe1; color: #2f4a2a; }

/* Browser chrome that belongs to one sample. */
#session:not([data-demo="dinner"]) :is(.history:not(.demo-history), #show-sources, #address),
#session[data-demo="dinner"] :is(.demo-history, #demo-address) {
  display: none;
}
.session-page .working-area > .workspace[hidden] { display: none !important; }

/* ---- Side panel: the Tether app frame --------------------------------------------- */
#extension-panel.tether-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  color-scheme: light;
}
#tether-root,
#tether-root > .tt-app { height: 100%; }
/* A short panel (phones, short laptops) must still show the whole decision, so a waiting
   checkpoint packs its rows and the composer steps aside until it is answered. */
#extension-panel.tether-panel { container: tether-panel / size; }
@container tether-panel (max-height: 620px) {
  .tt-screen-foot:has(.tt-checkpoint) .tt-composer { display: none; }
  .tt-screen-foot:has(.tt-checkpoint) { padding-block: 4px; }
  .tt-checkpoint-docked { gap: 8px; margin-bottom: 0; padding-block: 12px; }
  .tt-checkpoint-docked .tt-kv :is(dt, dd) { padding-block: 5px; }
}
/* The site styles every <header> as its dark masthead; the panel's top bar is never a bar. */
#extension-panel header.tt-bar { background: none; color: inherit; border-bottom: 0; }
.session-page #session #extension-panel :is(button, a, textarea):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.session-page #session #extension-panel .tt-composer textarea:focus-visible { outline: 0; }
.session-page #session #extension-panel .tt-composer:focus-within {
  box-shadow: var(--glass-shadow), 0 0 0 2px var(--focus);
}
@media (min-width: 851px) and (min-height: 501px), (min-width: 951px),
       (min-width: 761px) and (min-height: 501px) and (orientation: landscape) {
  #session[data-window] .working-area { --panel-track: clamp(300px, 28%, 400px); }
}

/* ---- Pages of the scripted samples ------------------------------------------------ */
.demo-page {
  position: relative;
  overflow: hidden;
  background: #fff;
  container-type: inline-size;
}
.demo-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.demo-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid #c9b8a3;
  border-radius: 999px;
  background: #fff;
  color: #5a2a12;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}
.demo-page .btn-dark { border-color: #2a1d14; background: #2a1d14; color: #fff; }
.demo-pointer {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 20px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Cpath d='M2 2 L2 16 L5.8 12.4 L8.6 18 L11.2 16.8 L8.6 11.4 L14 11.4 Z' fill='%231670b8' stroke='white' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 35%));
  transition: left 420ms cubic-bezier(.22, .78, .25, 1), top 420ms cubic-bezier(.22, .78, .25, 1);
}
.demo-pointer[hidden] { display: none; }
.demo-focus {
  border-radius: 6px;
  outline: 2px solid #1670b8;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgb(104 184 248 / 26%);
  transition: outline-color 200ms, box-shadow 200ms;
}
.demo-cited { background: #fff1a8; box-shadow: 0 0 0 3px #fff1a8; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) {
  .demo-pointer, .demo-focus { transition: none; }
}

/* Order: Marigold Kitchen */
.shop {
  min-height: 100%;
  background: #fffaf3;
  color: #2a1d14;
  font: 400 15px/1.45 var(--chrome-font, system-ui, sans-serif);
}
.shop-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #7a2e12;
  color: #fff7ea;
}
.shop-logo { font: 600 1.25rem/1 Georgia, serif; }
.shop-meta { font-size: 0.85rem; white-space: nowrap; }
.shop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  padding: 18px 22px 28px;
}
.shop h2 { margin: 0 0 4px; font: 600 1.5rem/1.2 Georgia, serif; }
.shop-note { margin: 0 0 4px; color: #6b5a4c; font-size: 0.85rem; }
.shop-section h3 {
  margin: 16px 0 4px;
  color: #8a4a26;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shop ul { list-style: none; margin: 0; padding: 0; }
.dish {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid #eadfcf;
}
.dish b { font-weight: 600; }
.dish p { margin: 2px 0 0; color: #6b5a4c; font-size: 0.84rem; }
.dish-price, .shop dd, .cart-total { font-variant-numeric: tabular-nums; }
.spice {
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e3f0d8;
  color: #2f5a1c;
  font-size: 0.72rem;
  font-weight: 700;
}
.spice-hot { background: #fbdcd3; color: #8c2a12; }
.spice-medium { background: #fbecc9; color: #6e4a00; }
.shop-cart {
  align-self: start;
  padding: 14px;
  border: 1px solid #eadfcf;
  border-radius: 12px;
  background: #fff;
}
.shop-cart h3 { margin: 0 0 6px; font-size: 1rem; }
.cart-lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0e6d8;
  font-size: 0.88rem;
}
.cart-empty { margin: 4px 0; color: #7a6a5c; font-size: 0.85rem; }
.cart-sub { display: flex; justify-content: space-between; margin: 10px 0; }
#mk-checkout { width: 100%; }
.shop[data-view="menu"] .checkout,
.shop[data-view="checkout"] .shop-body { display: none; }
.checkout { max-width: 540px; margin: 0 auto; padding: 22px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.co-block {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #eadfcf;
  border-radius: 10px;
  background: #fff;
}
.co-block small { display: block; color: #6b5a4c; font-size: 0.78rem; }
.co-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px solid #eadfcf;
  border-radius: 10px;
  background: #fff;
}
.co-lines :is(dt, dd) { margin: 0; padding: 5px 0; }
.co-lines dd { text-align: right; }
.co-lines .co-total { margin-top: 4px; padding-top: 9px; border-top: 1px solid #eadfcf; font-weight: 700; }
#mk-place { width: 100%; min-height: 42px; }
.shop[data-outcome="confirmed"] #mk-place { border-color: #2f6b3a; background: #2f6b3a; }
.co-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e3f0d8;
  color: #24481a;
  font-weight: 600;
}
.co-status:empty { display: none; }
@container (max-width: 640px) {
  .shop-body { grid-template-columns: minmax(0, 1fr); padding-inline: 14px; }
  .shop-mast { padding-inline: 14px; }
  .checkout { padding: 16px 14px; }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Lamp: three fictional stores */
.store {
  min-height: 100%;
  background: #fff;
  color: #1f2326;
  font: 400 15px/1.45 var(--chrome-font, system-ui, sans-serif);
}
.store-mast {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid #e3e3e0;
}
.store-logo { flex: none; font-size: 1.1rem; font-weight: 700; }
.store-mast.fernhill .store-logo { color: #3d4a2f; font: 600 1.25rem/1 Georgia, serif; }
.store-mast.arbor .store-logo { color: #5a3b22; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; }
.store-mast.lumen .store-logo { color: #111; font-weight: 800; letter-spacing: -0.02em; }
.store-search {
  flex: 1;
  min-width: 0;
  max-width: 340px;
  margin-left: auto;
  padding: 7px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f1ee;
  color: #55595c;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store[data-view="search"] .product,
.store[data-view="product"] .store-results { display: none; }
.store-results { padding: 18px 22px; }
.results-count { margin: 0 0 12px; color: #55595c; font-size: 0.88rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 3px; padding: 6px; }
.card img, .product img { display: block; width: 100%; height: auto; aspect-ratio: 12 / 11; border-radius: 10px; object-fit: cover; }
.card b { margin-top: 6px; font-size: 0.9rem; font-weight: 600; }
.card span { color: #3a3f42; font-size: 0.88rem; }
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  padding: 22px;
}
.crumbs { margin: 0; color: #6a6e70; font-size: 0.8rem; }
.product h2 { margin: 6px 0; font: 600 1.45rem/1.2 Georgia, serif; }
.product-price { margin: 0 0 12px; font-size: 1.2rem; font-weight: 600; }
.product-facts { margin: 0 0 16px; padding-left: 18px; color: #3a3f42; }
.product-facts li { margin: 4px 0; }
@container (max-width: 560px) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 14px; }
  .product img { max-width: 260px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-mast { padding-inline: 14px; }
  .store-results { padding: 14px; }
}

/* ---- Phones -------------------------------------------------------------------------- */
@media (max-width: 760px), (max-width: 850px) and (orientation: portrait),
       (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  #session .scout-tabs .group-chip { height: 26px; margin: 0 2px; padding: 0 8px; font-size: 0.72rem; }
  .tab-group [data-demo-tab] { flex: 1; min-width: 0; width: auto; }
  /* Narrow phone tabs shrink to their icon, as Chrome's do; the open tab keeps its name. */
  .tab-group [data-demo-tab][aria-pressed="false"] { flex: none; width: auto; padding-inline: 6px; }
  .tab-group [data-demo-tab][aria-pressed="false"] > span { display: none; }
  .scout-tabs [data-demo-tab] > i { width: 15px; height: 17px; font-size: 0.75rem; }
}
@media (forced-colors: active) {
  #session .scout-tabs .group-chip[aria-selected="true"] { outline: 2px solid Highlight; }
  .demo-focus { outline-color: Highlight; }
}
