/* Studio Pingwin: navy #1F2A44, orange #F28C28 and Outfit from the main site.
   All rules remain scoped so demo palettes cannot recolor this toolbar. */
.demo-toolbar { position: relative; z-index: 2; color: #fff; background: #1f2a44; font: 400 14px/1.4 "Outfit", sans-serif; }
.demo-toolbar, .demo-toolbar * { box-sizing: border-box; }
.demo-toolbar[hidden] { display: none; }
.demo-toolbar__inner { max-width: 1440px; margin: auto; padding: 8px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.demo-toolbar__title { display: flex; flex-direction: column; gap: 2px; }
.demo-toolbar strong { font-size: 16px; white-space: nowrap; }
.demo-toolbar__title span { font-size: 13px; line-height: 1.3; color: #c8d3ea; }
.demo-toolbar__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 32px; }
.demo-toolbar fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* Nazwy grup (Kolor, Zdjęcie) zostają dla czytników ekranu, ale nie są widoczne. */
.demo-toolbar legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo-toolbar__options { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.demo-toolbar button, .demo-toolbar__back { font: inherit; color: inherit; min-height: 44px; }
.demo-toolbar button { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid #77839c; border-radius: 4px; background: transparent; cursor: pointer; }
.demo-toolbar button:hover { background: #35435f; border-color: #fff; }
.demo-toolbar button[data-hero-choice][aria-pressed="true"] { background: #f28c28; border-color: #f28c28; color: #1f2a44; }
.demo-toolbar button[data-hero-choice][aria-pressed="true"]:hover { background: #f9c694; border-color: #f9c694; }
.demo-toolbar :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.demo-toolbar button[data-color] { width: 44px; height: 44px; padding: 8px; border-color: transparent; }
.demo-toolbar__swatch { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 4px; background: var(--swatch); border: 1px solid #aab8d3; }
.demo-toolbar button[data-color][aria-pressed="true"] .demo-toolbar__swatch { outline: 2px solid #fff; outline-offset: 2px; }
.demo-toolbar button[data-color][aria-pressed="true"] .demo-toolbar__swatch::after { content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
/* Link powrotny: podkreślone są tylko słowa, strzałka i odstęp zostają bez kreski, także po najechaniu. */
.demo-toolbar__back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.demo-toolbar__back-text { text-decoration: underline; text-underline-offset: 4px; }
.demo-toolbar__back:hover { color: #f9c694; }
.demo-toolbar__back:hover .demo-toolbar__back-text { text-decoration-thickness: 2px; }
/* Telefon: wszystko wyśrodkowane w kolejności tytuł z opisem, przełączniki, link powrotny. */
.demo-toolbar__inner { flex-direction: column; justify-content: center; text-align: center; padding: 10px 12px; gap: 8px; }
.demo-toolbar__title { align-items: center; }
.demo-toolbar__controls { flex-direction: column; gap: 4px; }
.demo-toolbar__controls fieldset { width: 100%; }
.demo-toolbar__controls [data-hero-choice] { padding-inline: 8px; font-size: 13px; }
/* Od 768px: tytuł po lewej, link po prawej, przełączniki wyśrodkowane pod spodem. */
@media (min-width: 768px) {
  .demo-toolbar__inner { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title back" "controls controls"; text-align: left; padding: 8px 20px; gap: 4px 24px; }
  .demo-toolbar__title { grid-area: title; align-items: flex-start; }
  .demo-toolbar__controls { grid-area: controls; flex-direction: row; justify-self: center; }
  .demo-toolbar__controls fieldset { width: auto; }
  .demo-toolbar__controls [data-hero-choice] { padding-inline: 10px; font-size: 14px; }
  .demo-toolbar__back { grid-area: back; justify-self: end; align-self: center; min-height: 44px; }
}
/* Szeroki desktop: tytuł, przełączniki i link w jednym rzędzie, przełączniki na środku paska. */
@media (min-width: 1100px) {
  .demo-toolbar { position: sticky; top: 0; z-index: 20; }
  html { scroll-padding-top: 72px; }
  .demo-toolbar__inner { grid-template-columns: 1fr auto 1fr; grid-template-areas: "title controls back"; }
}

/* Podpis pod stopką dema: ten sam granatowy pasek w obu demach Studio Pingwin. */
.demo-signature { background: #1f2a44; color: #fff; font: 400 14px/1.4 "Outfit", sans-serif; text-align: center; }
.demo-signature, .demo-signature * { box-sizing: border-box; margin: 0; }
.demo-signature[hidden] { display: none; }
.demo-signature p { padding: 18px 16px; }
.demo-signature a { color: inherit; text-underline-offset: 4px; }
.demo-signature a:hover { color: #f9c694; text-decoration-thickness: 2px; }
.demo-signature :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (min-width: 768px) { .demo-signature p { padding-block: 14px; } }
