.rajala-cookie-consent[hidden],
.rajala-cookie-preferences[hidden],
.rajala-cookie-settings-launcher[hidden] {
  display: none !important;
}

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

.rajala-cookie-consent {
  position: fixed;
  z-index: 999990;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  color: #17211a;
}

.rajala-cookie-consent__content {
  display: flex;
  width: min(100%, 1120px);
  margin-inline: auto;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(12, 35, 24, 0.24);
  align-items: center;
  gap: 1.25rem;
}

.rajala-cookie-consent__copy {
  flex: 1 1 420px;
}

.rajala-cookie-consent__copy h2,
.rajala-cookie-preferences__dialog h2 {
  margin: 0 0 0.45rem;
  color: #10391e;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.2;
}

.rajala-cookie-consent__copy p,
.rajala-cookie-preferences__dialog > p {
  margin: 0;
  color: #56635a;
  font-size: 0.95rem;
  line-height: 1.55;
}

.rajala-cookie-consent a {
  color: #174f2a;
  font-weight: 700;
}

.rajala-cookie-consent__actions,
.rajala-cookie-preferences__actions {
  display: flex;
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 0.65rem;
}

.rajala-cookie-consent__button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid #174f2a;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}

.rajala-cookie-consent__button--primary {
  border-color: #f2b705;
  background: #f2b705;
  color: #17211a;
}

.rajala-cookie-consent__button--secondary {
  background: #fff;
  color: #174f2a;
}

.rajala-cookie-consent__button:hover,
.rajala-cookie-consent__button:focus-visible {
  border-color: #174f2a;
  background: #174f2a;
  color: #fff;
}

.rajala-cookie-consent__button:focus-visible,
.rajala-cookie-preferences__close:focus-visible,
.rajala-cookie-settings-launcher:focus-visible,
.rajala-cookie-preferences__option input:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 3px;
}

.rajala-cookie-preferences {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  padding: 1rem;
  place-items: center;
}

.rajala-cookie-preferences__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 24, 0.72);
}

.rajala-cookie-preferences__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: calc(100vh - 2rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow-y: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.3);
}

.rajala-cookie-preferences__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f6f8f6;
  color: #17211a;
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.rajala-cookie-preferences__option {
  display: flex;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rajala-cookie-preferences__option strong,
.rajala-cookie-preferences__option span {
  display: block;
}

.rajala-cookie-preferences__option strong {
  margin-bottom: 0.25rem;
  color: #17211a;
}

.rajala-cookie-preferences__option span span {
  color: #56635a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.rajala-cookie-preferences__option input {
  width: 22px;
  height: 22px;
  accent-color: #174f2a;
}

.rajala-cookie-preferences__required {
  flex: 0 0 auto;
  color: #174f2a;
  font-size: 0.85rem;
  font-weight: 750;
}

.rajala-cookie-preferences__actions {
  margin-top: 1.25rem;
}

.rajala-cookie-settings-launcher {
  position: fixed;
  z-index: 999980;
  bottom: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: #10391e;
  box-shadow: 0 6px 20px rgba(12, 35, 24, 0.2);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rajala-cookie-settings-launcher svg {
  display: block;
  width: 24px;
  height: 24px;
}

.rajala-cookie-settings-launcher:hover {
  background: #174f2a;
}

.rajala-consent-open {
  overflow: hidden;
}

@media (max-width: 840px) {
  .rajala-cookie-consent__content {
    align-items: stretch;
    flex-direction: column;
  }

  .rajala-cookie-consent__copy {
    flex-basis: auto;
  }

  .rajala-cookie-consent__actions {
    flex-wrap: wrap;
  }

  .rajala-cookie-consent__button {
    flex: 1 1 180px;
  }
}

@media (max-width: 520px) {
  .rajala-cookie-consent {
    right: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
  }

  .rajala-cookie-consent__content {
    padding: 1rem;
  }

  .rajala-cookie-consent__actions,
  .rajala-cookie-preferences__actions {
    flex-direction: column;
  }

  .rajala-cookie-consent__button {
    width: 100%;
    flex-basis: auto;
  }

  .rajala-cookie-preferences__option {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rajala-cookie-consent *,
  .rajala-cookie-preferences * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
