.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  color: #1d2733;
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(20, 45, 70, .24);
}

.cookie-banner h2,
.cookie-modal h2 {
  margin: 0 36px 10px 0;
  color: #0b74c9;
  font-size: 1.45rem;
}

.cookie-banner p,
.cookie-modal p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.cookie-banner__actions,
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.cookie-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid #0879c9;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
}

.cookie-button--primary {
  color: #fff;
  background: #0879c9;
}

.cookie-button--secondary {
  color: #075f9e;
  background: #fff;
}

.cookie-button:hover,
.cookie-button:focus,
.cookie-close:hover,
.cookie-close:focus,
.cookie-settings-link:focus {
  outline: 3px solid rgba(8, 121, 201, .28);
  outline-offset: 2px;
}

.cookie-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #273849;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 30px;
  line-height: 36px;
  cursor: pointer;
}

.cookie-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 40, .65);
}

.cookie-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  color: #1d2733;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 48px rgba(0, 0, 0, .3);
}

.cookie-modal-open {
  overflow: hidden;
}

.cookie-category {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid #dce3e9;
}

.cookie-category p {
  margin: 5px 0 0;
  font-size: .95rem;
}

.cookie-switch {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 28px;
  margin: 0;
}

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

.cookie-switch span[aria-hidden="true"] {
  position: absolute;
  inset: 0;
  background: #8b969f;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}

.cookie-switch span[aria-hidden="true"]::before {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  content: "";
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.cookie-switch input:checked + span {
  background: #168638;
}

.cookie-switch input:checked + span::before {
  transform: translateX(24px);
}

.cookie-switch input:focus + span {
  outline: 3px solid rgba(8, 121, 201, .28);
  outline-offset: 2px;
}

.cookie-switch input:disabled + span {
  cursor: not-allowed;
  opacity: .72;
}

.cookie-settings-link {
  padding: 0;
  color: #022a44;
  background: transparent;
  border: 0;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.cookie-settings-link:hover {
  color: #2475cc;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 20px;
  }

  .cookie-banner__actions,
  .cookie-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-button {
    width: 100%;
  }

  .cookie-modal__panel {
    padding: 22px;
  }
}
