.legal-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-pending body {
  padding-bottom: var(--cookie-banner-space, 0);
  transition: padding-bottom .2s ease;
}

.cookie-banner {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  width: auto;
  grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
  gap: 22px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid #d2d2d7;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  color: #1d1d1f;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cookie-banner[hidden] { display: none; }
.cookie-kicker { margin: 0 0 8px !important; color: var(--green) !important; font: 600 10px var(--mono) !important; letter-spacing: .08em; }
.cookie-banner h2 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.04em; }
.cookie-banner p { margin: 0; color: #515154; font-size: 13px; line-height: 1.55; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cookie-actions .button { padding: 12px 15px; font-size: 12px; }
.cookie-actions .cookie-choice { flex: 1 1 210px; min-height: 44px; }
.cookie-banner .cookie-actions { justify-content: flex-end; margin-top: 0; }
.cookie-banner .cookie-choice { flex: 0 1 auto; min-width: 175px; }
.button-secondary { border: 1px solid #a9aaae; background: #fff; color: #1d1d1f; }
.button-link { flex-basis: 100%; padding: 6px !important; background: transparent; color: #3f4845; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner .button-link { text-align: right; }

.legal-dialog {
  width: min(820px, calc(100% - 32px));
  max-height: min(820px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .35);
}

.legal-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.legal-dialog__header { display: flex; align-items: center; justify-content: space-between; padding: 28px 30px 16px; }
.legal-dialog__header h2 { margin: 0; font-size: 28px; }
.legal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f5f5f7; color: #1d1d1f; font-size: 28px; line-height: 1; cursor: pointer; }
.legal-tabs { display: flex; gap: 8px; padding: 0 30px 20px; border-bottom: 1px solid #e5e5e8; }
.legal-tabs button { padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: #515154; font: 600 13px var(--font); cursor: pointer; }
.legal-tabs button[aria-selected="true"] { background: #e8f7f4; color: var(--green); }
.legal-dialog section { padding: 26px 30px 32px; }
.legal-dialog section h3 { margin: 0 0 16px; font-size: 24px; }
.legal-dialog section p { color: #515154; font-size: 14px; line-height: 1.65; }
.legal-dialog section a { color: var(--green); text-decoration: underline; }
.legal-dialog mark { padding: 1px 4px; background: #fff1b8; color: #594600; }
.cookie-settings { display: grid; gap: 12px; margin-top: 18px; }
.cookie-settings label { display: flex; gap: 10px; align-items: flex-start; color: #515154; font-size: 13px; line-height: 1.4; }
.cookie-settings input { margin-top: 2px; accent-color: var(--green); }
.cookie-table { display: grid; margin: 18px 0; overflow: hidden; border: 1px solid #dcdcdf; border-radius: 12px; font-size: 12px; }
.cookie-table [role="row"] { display: grid; grid-template-columns: 1.15fr 2fr .65fr; }
.cookie-table [role="row"] + div { border-top: 1px solid #dcdcdf; }
.cookie-table span, .cookie-table strong { padding: 10px; overflow-wrap: anywhere; }
.cookie-table strong { background: #f5f5f7; }
.cookie-banner button:focus-visible, .legal-dialog button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

@media (max-width: 900px) {
  .cookie-banner { grid-template-columns: 1fr; gap: 14px; }
  .cookie-banner .cookie-actions { justify-content: flex-start; }
  .cookie-banner .button-link { text-align: left; }
}

@media (max-width: 520px) {
  .cookie-banner { right: 10px; bottom: 10px; left: 10px; padding: 18px 16px; border-radius: 16px; }
  .cookie-banner h2 { font-size: 20px; }
  .cookie-banner .cookie-choice, .cookie-actions .button { flex: 1 1 100%; min-width: 0; }
  .legal-dialog__header { padding: 22px 22px 14px; }
  .legal-tabs { overflow: auto; padding: 0 22px 16px; }
  .legal-dialog section { padding: 22px; }
  .legal-dialog__header h2 { font-size: 24px; }
  .cookie-table [role="row"] { grid-template-columns: 1fr; }
  .cookie-table strong:not(:first-child) { display: none; }
  .cookie-table span { border-top: 1px solid #e5e5e8; }
  .cookie-table span:first-child { border-top: 0; }
}
