/* Celebrissio: the pasek (navigation bar) and footer 2 around the Flutter app, variant A
   (Jacek 19.10.2026, F.2-F.4). Navigation standard v6: light theme #EBEBEB solid and the
   default; dark theme 82 % with blur. Everything is served from this host. */

:root {
  --navy: #0A2E45;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 62px;
  --bar-bg: #EBEBEB;
  --bar-fg: #16171A;
  --bar-fg2: rgba(22, 23, 26, .72);
  --bar-line: rgba(0, 0, 0, .09);
  --bar-hover: rgba(0, 0, 0, .06);
  --bar-blur: none;
  --tip-bg: #16171A;
  --tip-fg: #FFFFFF;
  --pop-bg: #FFFFFF;
  --pop-fg: #16171A;
  --pop-mut: rgba(22, 23, 26, .64);
  --pop-line: rgba(0, 0, 0, .12);
  --page-bg: #F5F7FA;
  --foot-bg: #EBEBEB;
  --foot-fg: rgba(22, 23, 26, .78);
  --foot-mut: rgba(22, 23, 26, .62);
  --focus: #0A2E45;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bar-bg: rgba(14, 14, 16, .82);
  --bar-fg: #F5F5F6;
  --bar-fg2: rgba(245, 245, 246, .74);
  --bar-line: rgba(255, 255, 255, .10);
  --bar-hover: rgba(255, 255, 255, .09);
  --bar-blur: blur(14px);
  --tip-bg: #26282D;
  --pop-bg: #16171A;
  --pop-fg: #F5F5F6;
  --pop-mut: rgba(245, 245, 246, .66);
  --pop-line: rgba(255, 255, 255, .12);
  --page-bg: #0B0F14;
  --foot-bg: #0E0E10;
  --foot-fg: rgba(245, 245, 246, .82);
  --foot-mut: rgba(245, 245, 246, .62);
  --focus: #FFD166;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--bar-fg);
  font: 15px/1.45 var(--font);
}

/* The app sits between the pasek and the footer and never covers either. */
#aplikacja {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.pasek :focus-visible, .stopka :focus-visible, .szuflada :focus-visible, .okno :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- pasek ---------- */

.pasek {
  position: relative;
  z-index: 20;
  flex: none;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  background: var(--bar-bg);
  color: var(--bar-fg);
  border-bottom: 1px solid var(--bar-line);
  -webkit-backdrop-filter: var(--bar-blur);
  backdrop-filter: var(--bar-blur);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 12px;
  color: var(--bar-fg);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { background: var(--bar-hover); }
/* The badge only ever sits on the navy plate (F.6). */
.plyta {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--navy);
}
.plyta img { width: 36px; height: 36px; display: block; }
.logo .nazwa { font-weight: 800; font-size: 15px; letter-spacing: .14em; }

.ue {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--bar-fg);
  font: 600 10.5px/1.15 var(--font);
  text-align: left;
  cursor: pointer;
}
.ue:hover { background: var(--bar-hover); }
.ue svg { width: 36px; height: 24px; flex: none; display: block; }

.odstep { flex: 1; }
.grupa { display: flex; align-items: center; gap: 2px; }
.kreska { width: 1px; height: 24px; margin-inline: 6px; background: var(--bar-line); }

.ib {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--bar-fg2);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.ib:hover { background: var(--bar-hover); color: var(--bar-fg); }
.ib svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ib[data-tip]::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--tip-bg);
  color: var(--tip-fg);
  font: 600 12px/1 var(--font);
  white-space: nowrap;
  pointer-events: none;
}
.ib[data-tip]:focus-visible::after { display: block; }
/* On touch a tapped item keeps :hover, which would leave its tip over the app. */
@media (hover: hover) {
  .ib[data-tip]:hover::after { display: block; }
}
.ib[aria-expanded="true"]::after { display: none !important; }
/* The switch sits at the window's edge: its tip opens leftwards. */
.motyw[data-tip]::after { left: auto; right: 0; transform: none; }
.ib[aria-current="page"] { color: var(--bar-fg); }
.ib[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--bar-fg);
}
.ib.menu { display: none; }
/* The icon of the theme the switch goes to. */
.motyw .slonce { display: none; }
:root[data-theme="dark"] .motyw .slonce { display: block; }
:root[data-theme="dark"] .motyw .ksiezyc { display: none; }

/* ---------- phone: the menu, the vertical EU mark ---------- */

.szuflada {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--bar-h);
  z-index: 30;
  max-height: calc(100% - var(--bar-h));
  overflow-y: auto;
  padding: 8px 14px 18px;
  background: var(--pop-bg);
  color: var(--pop-fg);
  border-bottom: 1px solid var(--pop-line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
}
.szuflada a {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px 8px 4px 0;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.szuflada a:hover { background: var(--bar-hover); }
.szuflada .ico { width: 44px; height: 44px; display: grid; place-items: center; }
.szuflada .ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.szuflada .nm { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.szuflada .ds { display: block; font-weight: 500; font-size: 12.5px; line-height: 1.35; color: var(--pop-mut); }
.szuflada a[aria-current="page"] .nm { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  :root { --bar-h: 56px; }
  .pasek { gap: 6px; padding-inline: 8px; }
  .pasek .grupa, .pasek .kreska { display: none; }
  .ib.menu { display: grid; }
  .ue { flex-direction: column; justify-content: center; gap: 2px; height: 50px; padding: 0 6px; font-size: 8px; text-align: center; }
  .ue svg { width: 27px; height: 18px; }
  .logo { padding-right: 6px; }
  .plyta { width: 38px; height: 38px; }
  .plyta img { width: 32px; height: 32px; }
}
@media (max-width: 359px) {
  .logo .nazwa { display: none; }
}

/* ---------- the EU mark's window ---------- */

.okno {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 1px solid var(--pop-line);
  border-radius: 14px;
  background: var(--pop-bg);
  color: var(--pop-fg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  font: 14px/1.55 var(--font);
}
.okno[open] { display: flex; flex-direction: column; }
.okno::backdrop { background: rgba(0, 0, 0, .45); }
.okno .tresc { flex: 1 1 auto; min-height: 0; padding: 20px 22px 8px; overflow-y: auto; }
.okno h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; }
.okno .znaki { display: block; width: 100%; height: auto; margin: 0 0 14px; padding: 8px; border-radius: 8px; background: #FFFFFF; }
.okno p { margin: 0 0 10px; }
.okno dl { margin: 0 0 10px; }
.okno dt { font-weight: 700; }
.okno dd { margin: 0 0 8px; color: var(--pop-mut); }
.okno .kwoty { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--pop-line); font-weight: 700; }
.okno .tagi { font-weight: 700; }
.okno .akcje { flex: none; display: flex; justify-content: flex-end; padding: 10px 22px 18px; border-top: 1px solid var(--pop-line); }
.okno .akcje button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--pop-line);
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: 600 14px/1 var(--font);
  cursor: pointer;
}

/* ---------- footer 2: links only, and the seller in one line ---------- */

.stopka {
  position: relative;
  z-index: 10;
  flex: none;
  padding: 6px 16px 8px;
  background: var(--foot-bg);
  color: var(--foot-fg);
  border-top: 1px solid var(--bar-line);
  font-size: 12.5px;
  line-height: 1.4;
}
.stopka nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.stopka nav a {
  display: inline-block;
  padding: 4px 6px;
  border-radius: 6px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.stopka nav a:hover { text-decoration: underline; }
.stopka .sprzedawca { margin: 2px 0 0; }
/* One line; a tap shows the rest where the window is too narrow for it. */
.stopka .sprzedawca button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foot-mut);
  font: 11.5px/1.45 var(--font);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.stopka .sprzedawca button[aria-expanded="true"] { white-space: normal; }
@media (max-width: 760px) {
  .stopka { padding: 4px 8px 6px; }
  .stopka nav a { padding: 3px 5px; }
  .stopka .sprzedawca button { font-size: 10.5px; }
}
