.cookie-consent,
.cookie-preferences {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cookie-consent {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(16, 18, 17, 0.96), rgba(28, 33, 31, 0.94)),
    #101211;
  color: #f8faf9;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.cookie-consent[hidden],
.cookie-preferences[hidden] {
  display: none;
}

body.is-loading .cookie-consent,
body.is-loading .cookie-preferences {
  opacity: 0;
  pointer-events: none;
}

.cookie-consent::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #16a34a, #2d63e2, #f59e0b);
}

.cookie-consent__body {
  padding: 20px;
}

.cookie-consent__kicker {
  margin: 0 0 8px;
  color: #76f0a3;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cookie-consent h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.cookie-consent p {
  margin: 12px 0 0;
  color: rgba(248, 250, 249, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent a {
  color: #f8faf9;
  font-weight: 850;
  text-underline-offset: 3px;
}

.cookie-consent__choices {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.cookie-consent.is-customizing .cookie-consent__choices {
  display: block;
}

.cookie-consent__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.cookie-consent__row strong {
  display: block;
  font-size: 14px;
}

.cookie-consent__row span {
  display: block;
  margin-top: 3px;
  color: rgba(248, 250, 249, 0.64);
  font-size: 13px;
  line-height: 1.4;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch i {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-switch i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f8faf9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + i {
  border-color: rgba(118, 240, 163, 0.45);
  background: #16a34a;
}

.cookie-switch input:checked + i::after {
  transform: translateX(20px);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cookie-consent button,
.cookie-preferences {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 950;
  cursor: pointer;
}

.cookie-consent button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 14px;
}

.cookie-consent__accept {
  flex: 1 1 150px;
  border-color: rgba(22, 163, 74, 0.35) !important;
  background: #16a34a;
  color: #ffffff;
}

.cookie-consent__reject,
.cookie-consent__customize,
.cookie-consent__save {
  background: rgba(255, 255, 255, 0.07);
  color: #f8faf9;
}

.cookie-consent__save {
  display: none;
}

.cookie-consent.is-customizing .cookie-consent__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-consent.is-customizing .cookie-consent__customize {
  display: none;
}

.cookie-preferences {
  position: fixed;
  z-index: 70;
  left: 18px;
  bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 9px 12px;
  background: rgba(16, 18, 17, 0.82);
  color: #f8faf9;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

@media (max-width: 640px) {
  .cookie-consent {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .cookie-consent__body {
    padding: 16px;
  }

  .cookie-consent h2 {
    font-size: 20px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-consent button {
    width: 100%;
  }
}
