.cookie-consent[hidden] { display: none !important; }

.cookie-consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  width: min(390px, calc(100vw - 32px));
  color: #e8eef4;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(12px);
}

.cookie-consent__inner {
  padding: 13px 14px;
}

.cookie-consent__copy {
  margin: 0 0 10px;
  color: #dce5ed;
  font: 500 12.5px/1.45 Inter, Arial, sans-serif;
}

.cookie-consent__copy a {
  color: #9be5c5;
  text-underline-offset: 2px;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cookie-consent__button {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  font: 700 12px/1 Inter, Arial, sans-serif;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.cookie-consent__button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.11);
}

.cookie-consent__button--accept {
  border-color: #0b6b4f;
  background: #0b6b4f;
}

.cookie-consent__button--accept:hover {
  border-color: #0f8061;
  background: #0f8061;
}

.cookie-settings-link {
  appearance: none;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.footer-links .cookie-settings-link {
  color: inherit;
  font-size: 14px;
}

footer .cookie-settings-link:hover { color: #ffffff; }

.cookie-consent :focus-visible,
.cookie-settings-link:focus-visible {
  outline: 3px solid rgba(140, 224, 189, 0.55);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .cookie-consent {
    right: 8px;
    left: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  }

  .cookie-consent__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
  }

  .cookie-consent__copy {
    margin: 0;
    font-size: 10.5px;
    line-height: 1.3;
  }

  .cookie-consent__actions {
    display: flex;
    gap: 5px;
  }

  .cookie-consent__button {
    min-width: 54px;
    min-height: 30px;
    padding: 6px 7px;
    border-radius: 7px;
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__button { transition: none; }
}

/* Keep the Cookie Settings control aligned with footer links in the mobile grid. */
@media (max-width: 760px) {
  .footer-links--main .cookie-settings-link {
    width: 100%;
    padding: 10px 0;
    color: #c0cad3;
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    text-align: left;
    justify-self: stretch;
  }
}

/* v19: Make the native button occupy and align exactly like the adjacent footer links. */
@media (max-width: 760px) {
  .footer-links--main > .cookie-settings-link {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 0;
    border: 0;
    border-radius: 0;
    justify-self: stretch;
    align-self: stretch;
    color: #c0cad3;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: inherit;
    text-align: left;
    text-indent: 0;
    white-space: nowrap;
  }
}
