/* Zestawy — konfigurator 1:1 jak PsiBufet, kolory ZOOFLIP */

html.is-zestawy-screen,
html.is-zestawy-screen body {
  height: 100%;
  overflow: hidden;
  background: #fff;
}

body.is-zestawy-screen .site-footer,
body.is-zestawy-screen .newsletter-section,
body.is-zestawy-screen .yoast-breadcrumbs,
body.is-zestawy-screen .mobile-bottom-bar,
body.is-zestawy-screen .products-breadcrumb,
body.is-zestawy-screen .cart-fab {
  display: none !important;
}

body.is-zestawy-screen .page-main.zestawy-page,
body.is-zestawy-screen .page-main.zestawy-page > .wp-block-zooflip-zestawy,
body.is-zestawy-screen .page-main.zestawy-page .entry-content,
body.is-zestawy-screen .page-main.zestawy-page .zestawy {
  height: calc(100dvh - var(--zestawy-header, var(--site-header-height, 160px)));
  max-width: none;
  margin: 0;
  padding: 0;
}

.zestawy-page,
.zestawy {
  background: #fff;
}

.zestawy {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  min-height: 28rem;
  color: var(--color-navy, #1a2e4a);
}

.zestawy__progress {
  flex-shrink: 0;
  height: 6px;
  background: #ececec;
}

.zestawy__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-navy, #1a2e4a);
  transition: width 0.35s ease;
}

.zestawy__body {
  flex: 1;
  display: grid;
  min-height: 0;
  overflow: hidden;
  padding: clamp(1.5rem, 6vh, 4.5rem) 1.25rem 1rem;
}

.zestawy__stage {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(640px, 100%);
  margin: 0 auto;
  min-height: 0;
  text-align: center;
}

.zestawy__stage--result {
  align-items: stretch;
  text-align: left;
  overflow: auto;
}

.zestawy__stage[hidden] {
  display: none !important;
}

.zestawy__stage.is-enter .zestawy__question,
.zestawy__stage.is-enter .zestawy__lead,
.zestawy__stage.is-enter .zestawy__choices,
.zestawy__stage.is-enter .zestawy__text-wrap,
.zestawy__stage.is-enter .zestawy__items,
.zestawy__stage.is-enter .zestawy__total,
.zestawy__stage.is-enter .zestawy__chat {
  animation: zestawy-in 0.38s ease both;
}

.zestawy__question {
  margin: 0 0 1.35rem;
  font-size: clamp(1.7rem, 4.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-teal, #52bcb4);
}

.zestawy__question--hero,
.zestawy__question--result {
  color: var(--color-teal, #52bcb4);
}

.zestawy__lead {
  margin: 0 0 1.5rem;
  color: var(--color-navy, #1a2e4a);
  font-size: 1.02rem;
  line-height: 1.45;
}

.zestawy__choices {
  display: grid;
  gap: 0.7rem;
  width: 100%;
}

.zestawy[data-count="2"] .zestawy__choices,
.zestawy[data-count="4"] .zestawy__choices {
  grid-template-columns: 1fr 1fr;
}

.zestawy__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 72px;
  padding: 0.9rem 1rem;
  border: 2px solid var(--color-navy, #1a2e4a);
  border-radius: 8px;
  background: #fff;
  color: var(--color-navy, #1a2e4a);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.zestawy__choice:hover,
.zestawy__choice:focus-visible {
  background: color-mix(in srgb, var(--color-mint, #b5ebe8) 45%, #fff);
}

.zestawy__choice.is-on {
  background: var(--color-navy, #1a2e4a);
  color: #fff;
}

.zestawy__choice strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.zestawy__choice span {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.75;
}

.zestawy__text-wrap {
  width: min(420px, 100%);
}

.zestawy__input {
  width: 100%;
  min-height: 58px;
  padding: 0.7rem 1rem;
  border: 2px solid var(--color-navy, #1a2e4a);
  border-radius: 6px;
  background: #fff;
  color: var(--color-navy, #1a2e4a);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.zestawy__input:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-teal, #52bcb4) 35%, #fff);
}

.zestawy__input--note {
  min-height: 96px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  resize: vertical;
}

.zestawy__budget-extra {
  margin-top: 0.85rem;
  text-align: left;
}

.zestawy__budget-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.zestawy__budget-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.zestawy__input--budget {
  text-align: left;
  font-size: 1.15rem;
}

.zestawy__role {
  display: inline-block;
  margin: 0.15rem 0.4rem 0 0;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-mint, #b5ebe8) 70%, #fff);
  color: var(--color-navy, #1a2e4a);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.zestawy__meta {
  display: block;
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--color-muted, #5c6b7a);
}

.zestawy__chat {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.zestawy__chat-title {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.zestawy__chat-log {
  display: grid;
  gap: 0.4rem;
  max-height: 9rem;
  overflow: auto;
  margin-bottom: 0.55rem;
}

.zestawy__chat-msg {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.zestawy__chat-msg--user {
  justify-self: end;
  background: var(--color-navy, #1a2e4a);
  color: #fff;
}

.zestawy__chat-msg--assistant {
  justify-self: start;
  background: color-mix(in srgb, var(--color-mint, #b5ebe8) 45%, #fff);
  color: var(--color-navy, #1a2e4a);
}

.zestawy__chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.zestawy__chip {
  padding: 0.28rem 0.7rem;
  border: 1.5px solid var(--color-navy, #1a2e4a);
  border-radius: 999px;
  background: #fff;
  color: var(--color-navy, #1a2e4a);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.zestawy__chip:hover,
.zestawy__chip:focus-visible {
  background: color-mix(in srgb, var(--color-mint, #b5ebe8) 45%, #fff);
}

.zestawy__chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.zestawy__chat-input {
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--color-navy, #1a2e4a);
  border-radius: 8px;
  font-size: 16px;
}

.zestawy__chat-send {
  border: 0;
  border-radius: 8px;
  padding: 0 0.95rem;
  background: var(--color-teal, #52bcb4);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.zestawy__chat-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.zestawy__items {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.zestawy__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid #eee;
}

.zestawy__item img,
.zestawy__item > span {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-mint, #b5ebe8);
}

.zestawy__item strong {
  display: block;
  color: var(--color-navy, #1a2e4a);
}

.zestawy__item em {
  font-style: normal;
  color: #5b6b7c;
}

.zestawy__total {
  margin: 0;
  font-size: 1.05rem;
}

.zestawy__total strong {
  font-size: 1.35rem;
  color: var(--color-navy, #1a2e4a);
}

.zestawy__foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.25rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
}

.zestawy__hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(720px, 100%);
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-navy, #1a2e4a);
  border-radius: 10px;
  background: var(--color-yellow, #efd56a);
  color: var(--color-navy, #1a2e4a);
  text-align: left;
}

.zestawy__hint p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.zestawy__hint-ico {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 58%, var(--color-navy, #1a2e4a) 28%, transparent 29%),
    radial-gradient(circle at 50% 30%, var(--color-navy, #1a2e4a) 14%, transparent 15%),
    var(--color-mint, #b5ebe8);
}

.zestawy__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(360px, 100%);
  min-height: 56px;
  padding: 0.85rem 1.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-teal, #52bcb4);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.zestawy__cta:hover {
  background: var(--color-teal-dark, #3da89f);
}

.zestawy__cta:disabled {
  opacity: 0.45;
  cursor: default;
}

.zestawy__foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.1rem;
  min-height: 1.2rem;
}

.zestawy__sub {
  border: 0;
  background: none;
  padding: 0;
  color: var(--color-navy, #1a2e4a);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.zestawy__sub[hidden] {
  display: none !important;
}

.zestawy__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dash-zestaw {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(26, 46, 74, 0.08);
}

.dash-zestaw__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.dash-zestaw__meta {
  margin: 0.25rem 0 0;
  color: #5b6b7c;
  font-size: 0.9rem;
}

.dash-zestaw__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@keyframes zestawy-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  body.is-zestawy-screen .search-bar,
  body.is-zestawy-screen .announcement-bar {
    display: none !important;
  }

  body.is-zestawy-screen .page-main.zestawy-page,
  body.is-zestawy-screen .page-main.zestawy-page > .wp-block-zooflip-zestawy,
  body.is-zestawy-screen .page-main.zestawy-page .entry-content,
  body.is-zestawy-screen .page-main.zestawy-page .zestawy {
    height: calc(100dvh - var(--zestawy-header, 64px));
  }

  .zestawy {
    min-height: 0;
  }

  .zestawy__progress {
    height: 3px;
  }

  .zestawy__body {
    padding: 0.65rem 0.9rem 0.25rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .zestawy__question {
    margin: 0 0 0.55rem;
    font-size: clamp(1.2rem, 5.8vw, 1.45rem);
  }

  .zestawy__lead {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
  }

  .zestawy__choices {
    gap: 0.4rem;
  }

  .zestawy[data-count="2"] .zestawy__choices,
  .zestawy[data-count="4"] .zestawy__choices {
    grid-template-columns: 1fr 1fr;
  }

  .zestawy__choice {
    min-height: 48px;
    padding: 0.45rem 0.55rem;
    border-width: 1.5px;
  }

  .zestawy__choice strong {
    font-size: 0.92rem;
  }

  .zestawy__choice span {
    font-size: 0.7rem;
  }

  .zestawy__input {
    min-height: 46px;
    font-size: 16px;
  }

  .zestawy__input--note {
    min-height: 78px;
  }

  .zestawy__chat {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .zestawy__chat-log {
    max-height: 7rem;
  }

  .zestawy__chat-input {
    min-height: 40px;
  }

  .zestawy__hint {
    display: none;
  }

  .zestawy__foot {
    gap: 0.4rem;
    padding: 0.4rem 0.9rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }

  .zestawy__cta {
    min-width: 100%;
    min-height: 46px;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
  }

  .zestawy__foot-links {
    min-height: 0;
    gap: 0.55rem 0.9rem;
  }

  .zestawy__item {
    grid-template-columns: 44px 1fr;
    gap: 0.5rem;
  }

  .zestawy__item img,
  .zestawy__item > span {
    width: 44px;
    height: 44px;
  }

  .zestawy__total strong {
    font-size: 1.1rem;
  }

  body.is-zestawy-screen .cookie-banner {
    padding: 0 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }

  body.is-zestawy-screen .cookie-banner__shell {
    max-width: none;
    padding: 0.7rem 0.8rem;
    gap: 0.45rem;
  }

  body.is-zestawy-screen .cookie-banner__title {
    font-size: 0.92rem;
  }

  body.is-zestawy-screen .cookie-banner__text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zestawy__stage.is-enter .zestawy__question,
  .zestawy__stage.is-enter .zestawy__lead,
  .zestawy__stage.is-enter .zestawy__choices,
  .zestawy__stage.is-enter .zestawy__text-wrap,
  .zestawy__progress-bar {
    animation: none !important;
    transition: none !important;
  }
}
