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

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  color: #fff;
  background: #001b49;
  border: 2px solid #ffd000;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.cookie-banner h2,
.cookie-preferences h2 {
  margin: 0 40px 10px 0;
}

.cookie-banner-content {
  display: grid;
  grid-template-columns: minmax(0,1fr) 170px;
  column-gap: 20px;
  align-items: center;
}

.cookie-banner-content h2,
.cookie-banner-content p {
  grid-column: 1;
}

.cookie-banner-content .cookie-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
}

.cookie-banner-content .cookie-button {
  width: 100%;
  min-width: 0;
}

.cookie-banner p {
  margin: 8px 0;
  line-height: 1.5;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

.cookie-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: inherit;
  font-size: 28px;
  line-height: 32px;
  background: transparent;
  border: 1px solid currentColor;
  cursor: pointer;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.cookie-button {
  min-width: 150px;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  border: 2px solid #ffd000;
  cursor: pointer;
}

.cookie-button-primary {
  color: #001b49;
  background: #ffd000;
}

.cookie-button-secondary {
  color: #001b49;
  background: #fff;
}

.cookie-button-outline {
  color: #fff;
  background: transparent;
}

.cookie-button:focus,
.cookie-close:focus,
.cookie-settings-button:focus,
.cookie-category input:focus {
  outline: 3px solid #ffd200;
  outline-offset: 3px;
}

.cookie-settings-button {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9998;
  padding: 9px 14px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: #001b49;
  border: 2px solid #ffd000;
  cursor: pointer;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.65);
}

.cookie-preferences-panel {
  position: relative;
  width: min(100%,680px);
  max-height: 90vh;
  padding: 26px;
  overflow-y: auto;
  color: #001b49;
  background: #fff;
  border-top: 8px solid #ffd000;
  box-shadow: 0 14px 45px rgba(0,0,0,.4);
}

.cookie-preferences .cookie-close {
  color: #001b49;
}

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

.cookie-category strong,
.cookie-category small {
  display: block;
}

.cookie-category small {
  margin-top: 5px;
}

.cookie-category input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.cookie-preferences .cookie-button-outline {
  color: #001b49;
}

.cookie-policy-link {
  margin: 20px 0 0;
  font-size: .9rem;
}

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

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

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

  .cookie-banner-content {
    display: block;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .cookie-banner-content .cookie-actions {
    display: grid;
    margin-top: 14px;
  }

  .cookie-button {
    width: 100%;
  }

  .cookie-settings-button {
    right: 8px;
    bottom: 8px;
  }
}
