/* =========================================================
   COOKIES.CSS — banner + panel (SKYNEST)
   - spójna kolorystyka (tokeny z main.css)
   - banner na dole + modal ustawień
   ========================================================= */

.cookie-banner{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;

  padding: 0.95rem 0;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid rgba(15,23,42,0.12);
  box-shadow: 0 -18px 40px rgba(15,23,42,0.12);
  backdrop-filter: blur(14px);
}

.cookie-banner__inner{
  width: min(var(--container-max, 1120px), calc(100% - var(--container-gutter, 2rem)));
  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

@media (max-width: 420px){
  .cookie-banner__inner{
    width: min(var(--container-max, 1120px), calc(100% - 1.25rem));
  }
}

.cookie-banner__text{
  margin: 0;
  flex: 1 1 520px;
  min-width: 0;
  color: rgba(15,23,42,0.72);
  line-height: 1.55;
  font-size: 0.95rem;
}

.cookie-banner__buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-start;
}

.cookie-banner .btn{
  white-space: nowrap;
}

.cookie-banner .btn-ghost{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.14);
  color: rgba(15,23,42,0.92);
}

.cookie-banner .btn-ghost:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.cookie-banner .btn-small{
  padding: 0.52rem 0.95rem;
  font-size: 0.88rem;
}

@media (max-width: 560px){
  .cookie-banner__inner{
    justify-content: center;
    text-align: center;
  }
  .cookie-banner__buttons{
    justify-content: center;
  }
}

/* =========================
   Modal / panel
   ========================= */

.cookie-panel-backdrop{
  position: fixed;
  inset: 0;
  z-index: 1300;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: clamp(1rem, 2vw, 2rem);
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
}

.cookie-panel-backdrop[hidden]{ display: none !important; }

.cookie-panel{
  width: min(920px, calc(100% - 0px));
  max-height: calc(100dvh - 2rem);
  overflow: auto;

  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 22px;
  box-shadow: 0 32px 110px rgba(2,6,23,0.55);

  padding: clamp(1.1rem, 1.4vw, 1.6rem);
}

.cookie-panel__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.cookie-panel__header h2{
  margin: 0;
  font-size: clamp(1.25rem, 0.55vw + 1.1rem, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: rgba(15,23,42,0.94);
}

.cookie-panel__close{
  appearance: none;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.80);
  color: rgba(15,23,42,0.88);

  width: 42px;
  height: 42px;
  border-radius: 14px;

  display: grid;
  place-items: center;

  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;

  transition: transform .14s ease, box-shadow .18s ease, background-color .18s ease;
}

.cookie-panel__close:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.cookie-panel__intro{
  margin: 0 0 1.15rem;
  color: rgba(15,23,42,0.70);
  line-height: 1.65;
  max-width: 85ch;
}

.cookie-panel__section{
  margin-top: 1.1rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(15,23,42,0.10);
}

.cookie-panel__section h3{
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(15,23,42,0.70);
}

.cookie-panel__text{
  margin: 0;
  color: rgba(15,23,42,0.70);
  line-height: 1.6;
}

/* categories */
.cookie-category{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.70);
  border-radius: 18px;
  padding: 0.95rem 1.0rem;
}

.cookie-category + .cookie-category{ margin-top: 0.75rem; }

.cookie-category__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.cookie-category__header strong{
  font-size: 1.02rem;
  color: rgba(15,23,42,0.92);
}

.cookie-category__pill{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;

  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.10);
  color: rgba(15,23,42,0.70);
}

.cookie-category__text{
  margin: 0.55rem 0 0;
  color: rgba(15,23,42,0.70);
  line-height: 1.6;
}

/* toggle */
.cookie-toggle{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
  cursor: pointer;
}

.cookie-toggle input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cookie-toggle__slider{
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15,23,42,0.18);
  border: 1px solid rgba(15,23,42,0.12);
  position: relative;
  transition: background-color .18s ease, border-color .18s ease;
}

.cookie-toggle__slider::after{
  content:"";
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15,23,42,0.18);
  transition: transform .18s ease;
}

.cookie-toggle input:checked + .cookie-toggle__slider{
  background: var(--color-accent, #2563eb);
  border-color: var(--color-accent, #2563eb);
}

.cookie-toggle input:checked + .cookie-toggle__slider::after{
  transform: translateY(-50%) translateX(20px);
}

.cookie-toggle__label{
  font-size: 0.92rem;
  font-weight: 750;
  color: rgba(15,23,42,0.78);
}

/* list */
.cookie-list{
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;

  display: grid;
  gap: 0.65rem;
}

.cookie-list li{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.cookie-list__name{
  font-weight: 850;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  color: rgba(15,23,42,0.92);
}

.cookie-list__meta{
  color: rgba(15,23,42,0.70);
  line-height: 1.55;
  margin-bottom: 0.35rem;
}

.cookie-list__value{
  color: rgba(15,23,42,0.70);
  word-break: break-word;
}

/* footer buttons */
.cookie-panel__footer{
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(15,23,42,0.10);
}

.cookie-panel .btn-ghost{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.14);
  color: rgba(15,23,42,0.92);
}

/* focus */
.cookie-panel :focus-visible{
  outline: 2px solid rgba(37,99,235,0.55);
  outline-offset: 3px;
  border-radius: 12px;
}

body.cookie-panel-open{
  overflow: hidden;
}

/* =========================
   Kolizje z FAB (gdy banner widoczny)
   ========================= */

body.cookie-banner-visible .fab-button--top{
  bottom: calc(1.25rem + 90px);
}
body.cookie-banner-visible .fab-button--contact{
  bottom: calc(4rem + 90px);
}

@media (max-width: 640px){
  body.cookie-banner-visible .contact-nudge{
    bottom: calc(0.9rem + env(safe-area-inset-bottom) + 90px);
  }
}