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

.cookie-consent {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 2147483000;
  color: #172033;
}

.cookie-consent__panel {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(45, 65, 95, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(29, 43, 71, 0.18);
}

.cookie-consent__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent__title {
  margin: 0;
  color: #172033;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 800;
}

.cookie-consent__body,
.cookie-consent__muted {
  margin: 8px 0 0;
  color: #5f6e83;
  font-size: 0.95rem;
  line-height: 1.45;
}

.cookie-consent__link {
  color: #2f5fbd;
  font-weight: 700;
  text-decoration: none;
}

.cookie-consent__link:hover {
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.cookie-consent__button,
.cookie-settings-button {
  min-height: 44px;
  border: 1px solid rgba(45, 65, 95, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.cookie-consent__button {
  padding: 0 18px;
}

.cookie-consent__button:hover,
.cookie-settings-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(49, 91, 178, 0.13);
}

.cookie-consent__button:focus-visible,
.cookie-settings-button:focus-visible,
.cookie-consent__switch input:focus-visible + span {
  outline: 3px solid rgba(49, 91, 178, 0.28);
  outline-offset: 2px;
}

.cookie-consent__button--primary,
.cookie-consent__button--reject {
  min-width: 148px;
}

.cookie-consent__button--primary {
  border-color: #315eb8;
  background: #315eb8;
  color: #fff;
}

.cookie-consent__button--reject {
  border-color: #315eb8;
  background: #fff;
  color: #315eb8;
}

.cookie-consent__button--ghost {
  color: #172033;
}

.cookie-consent__button--close {
  min-width: 44px;
  padding: 0 12px;
}

.cookie-consent__preferences {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cookie-consent__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #f4f7fb;
  border: 1px solid rgba(45, 65, 95, 0.1);
  border-radius: 8px;
}

.cookie-consent__row-title {
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  font-weight: 800;
}

.cookie-consent__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e5ebf4;
  color: #5f6e83;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.cookie-consent__switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

.cookie-consent__switch span {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
}

.cookie-consent__switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s ease;
}

.cookie-consent__switch input:checked + span {
  background: #315eb8;
}

.cookie-consent__switch input:checked + span::after {
  transform: translateX(22px);
}

.cookie-settings-button {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147482900;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #315eb8;
}

@media (max-width: 640px) {
  .cookie-consent {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
  }

  .cookie-consent__panel {
    padding: 14px;
  }

  .cookie-consent__header,
  .cookie-consent__row {
    grid-template-columns: 1fr;
  }

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

  .cookie-consent__button {
    width: 100%;
  }
}
