.cookie-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 2147483000;
  display: none;
  justify-content: center;
  font-family: inherit;
  color: #111827;
}

.cookie-consent.is-visible {
  display: flex;
}

.cookie-consent__panel {
  width: min(760px, 100%);
  padding: 22px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.2);
}

.cookie-consent__title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
}

.cookie-consent__text {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #374151;
}

.cookie-consent__text a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.cookie-consent__button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #111827;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cookie-consent__button--primary {
  background: #111827;
  color: #ffffff;
}

.cookie-consent__button:focus-visible,
.cookie-preferences-button:focus-visible,
.cookie-preferences__close:focus-visible,
.cookie-switch input:focus-visible + .cookie-switch__track {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

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

.cookie-preferences-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147482999;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.16);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.46);
  font-family: inherit;
  color: #111827;
}

.cookie-preferences.is-visible {
  display: flex;
}

.cookie-preferences__panel {
  width: min(640px, 100%);
  max-height: min(720px, 100%);
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(17, 24, 39, 0.28);
}

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

.cookie-preferences__header h2 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.3;
}

.cookie-preferences__close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-preferences__category {
  padding: 16px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.12);
}

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

.cookie-preferences__row h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.cookie-preferences__row p {
  margin: 0;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.5;
}

.cookie-preferences__required {
  white-space: nowrap;
  color: #2563eb;
  font-size: 0.86rem;
  font-weight: 700;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
}

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

.cookie-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
}

.cookie-switch__track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.22);
  content: "";
  transition: transform 0.18s ease;
}

.cookie-switch input:checked + .cookie-switch__track {
  background: #111827;
}

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

.legal-subfooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 10px 20px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
}

.legal-subfooter::before,
.legal-subfooter::after {
  content: "";
  flex: 1 1 0;
}

.legal-subfooter__info,
.legal-subfooter__links {
  display: flex;
  align-items: center;
  flex: 0 1 720px;
  gap: 18px;
}

.legal-subfooter__links {
  justify-content: flex-end;
}

.legal-subfooter a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.legal-subfooter__instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.legal-subfooter__instagram svg {
  width: 22px;
  height: 22px;
}

.legal-subfooter a:hover,
.legal-subfooter a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-subfooter__instagram:hover,
.legal-subfooter__instagram:focus-visible {
  text-decoration: none;
}

.legal-subfooter--analysis {
  background: #ff6600;
  color: #ffffff;
}

.legal-subfooter--analysis .legal-subfooter__instagram svg {
  color: #ffffff;
  stroke: currentColor;
}

@media (max-width: 640px) {
  .cookie-consent {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .cookie-consent__panel,
  .cookie-preferences__panel {
    padding: 18px;
  }

  .cookie-consent__actions {
    flex-direction: column;
  }

  .cookie-consent__button {
    width: 100%;
  }

  .cookie-preferences-button {
    top: 76vh;
    right: auto;
    bottom: auto;
    left: 0;
    width: 10px;
    height: 36px;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-color: #111827;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #111827;
    color: transparent;
    box-shadow: none;
    font-size: 0;
  }

  .cookie-preferences-button::after {
    content: none;
  }

  .legal-subfooter {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    padding: 9px 14px;
    font-size: 0.86rem;
  }

  .legal-subfooter::before,
  .legal-subfooter::after {
    content: none;
  }

  .legal-subfooter__info,
  .legal-subfooter__links {
    flex: 0 1 auto;
    justify-content: center;
    gap: 16px;
  }
}
