/* ============================================================
   KARP ADWOKACI — Cookie Consent Banner & Modal
   Zmienne CSS pobierane z style.css (muszą być załadowany wcześniej)
   ============================================================ */

/* ── Banner ──────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9900;
  background: rgba(7, 7, 7, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  padding: 18px 0;
  transform: translateY(100%);
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.cookie-banner--visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner__title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner__title::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: #926b57;
  border-radius: 50%;
  flex-shrink: 0;
}

.cookie-banner__desc {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: #9E9E9E;
}

.cookie-banner__desc a {
  color: #926b57;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms;
}

.cookie-banner__desc a:hover {
  color: #b08472;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Cookie buttons ──────────────────────────────────────── */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.cookie-btn--settings {
  background: transparent;
  color: #848484;
  border-color: rgba(255, 255, 255, 0.12);
}

.cookie-btn--settings:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.30);
}

.cookie-btn--essential {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cookie-btn--essential:hover {
  border-color: #926b57;
  color: #926b57;
  background: rgba(146, 107, 87, 0.08);
}

.cookie-btn--accept {
  background: #926b57;
  color: #ffffff;
  border-color: #926b57;
}

.cookie-btn--accept:hover {
  background: #7a5947;
  border-color: #7a5947;
  box-shadow: 0 4px 20px rgba(146, 107, 87, 0.40);
  transform: translateY(-1px);
}

/* ── Modal overlay ───────────────────────────────────────── */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-overlay.cookie-modal--visible {
  opacity: 1;
  visibility: visible;
}

/* ── Modal box ───────────────────────────────────────────── */
.cookie-modal {
  background: #161616;
  border: 1px solid #383838;
  border-top: 3px solid #926b57;
  border-radius: 16px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(14px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-overlay.cookie-modal--visible .cookie-modal {
  transform: translateY(0) scale(1);
}

.cookie-modal__title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.cookie-modal__desc {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: #9E9E9E;
  margin-bottom: 22px;
}

.cookie-modal__desc a {
  color: #926b57;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Cookie category ─────────────────────────────────────── */
.cookie-category {
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cookie-category__name {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.cookie-category__desc {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #6B6B6B;
}

/* ── Toggle switch ───────────────────────────────────────── */
.cookie-toggle {
  position: relative;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
}

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

.cookie-toggle__track {
  position: absolute;
  inset: 0;
  background: #525252;
  border-radius: 21px;
  cursor: pointer;
  transition: background 220ms;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 2.5px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.cookie-toggle input:checked + .cookie-toggle__track {
  background: #926b57;
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(17px);
}

.cookie-toggle input:disabled + .cookie-toggle__track {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Modal actions ───────────────────────────────────────── */
.cookie-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.cookie-modal__actions .cookie-btn {
  flex: 1;
  min-width: 110px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
  }

  .cookie-modal {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .cookie-modal__actions {
    flex-direction: column;
  }

  .cookie-modal__actions .cookie-btn {
    width: 100%;
  }
}
