/* Okienko zgody na pliki cookies (koncepcja Cookies / CookiesTelefon) i przycisk zmiany zgody. */

.xs-consent-box {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 80;
  width: 480px;
  max-width: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--xs-line);
  border-radius: 20px;
  background: var(--xs-surface);
  box-shadow: 0 16px 48px rgba(20, 20, 21, 0.18);
}

.xs-consent-box[hidden],
.xs-consent-box__view[hidden],
.xs-consent-reopen[hidden] {
  display: none;
}

.xs-consent-box h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.xs-consent-box__view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.xs-consent-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--xs-text-2);
}

.xs-consent-box p a {
  text-decoration: underline;
}

.xs-consent-box__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.xs-consent-box__link {
  align-self: center;
  height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--xs-muted);
  text-decoration: underline;
}

.xs-consent-box__group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--xs-line-soft);
}

.xs-consent-box__group > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.xs-consent-box__group small {
  font-size: 13px;
  line-height: 1.45;
  color: var(--xs-muted);
}

.xs-switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #c9c7c2;
}

.xs-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(20, 20, 21, 0.25);
  transition: left 0.15s ease;
}

.xs-switch[aria-checked="true"] {
  background: var(--xs-brand);
}

.xs-switch[aria-checked="true"] span {
  left: 21px;
}

.xs-switch:disabled {
  opacity: 0.55;
  cursor: default;
}

.xs-consent-reopen {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 80;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--xs-line);
  border-radius: var(--xs-radius);
  background: var(--xs-surface);
  box-shadow: 0 4px 16px rgba(20, 20, 21, 0.12);
}

@media (max-width: 900px) {
  .xs-consent-box {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }

  .xs-consent-reopen {
    left: 12px;
    bottom: 12px;
  }
}
