/* Techwish cookie consent — uses theme --tw-* tokens when available. */
.tw-consent {
  --twc-ink: var(--tw-ink, #0B0F0D);
  --twc-ink-2: var(--tw-ink-2, #2A2F2C);
  --twc-mute: var(--tw-mute, #6B7470);
  --twc-line: var(--tw-line, #DDE3E0);
  --twc-mint: var(--tw-mint, #2DCE92);
  --twc-mint-600: var(--tw-mint-600, #1FB37C);
  --twc-bg: #fff;
  --twc-shadow: 0 -8px 32px rgba(11, 15, 13, 0.12);
  font-family: var(--tw-sans, "DM Sans", system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--twc-ink-2);
  z-index: 99999;
}

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

.tw-consent__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 13, 0.35);
  z-index: 1;
}

.tw-consent__backdrop[hidden] {
  display: none !important;
}

.tw-consent__bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: var(--twc-bg);
  box-shadow: var(--twc-shadow);
  border-top: 1px solid var(--twc-line);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}

.tw-consent__bar[hidden] {
  display: none !important;
}

.tw-consent__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.tw-consent__copy {
  flex: 1 1 280px;
  min-width: 0;
}

.tw-consent__title {
  margin: 0 0 6px;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--twc-ink);
}

.tw-consent__body {
  margin: 0;
  color: var(--twc-mute);
}

.tw-consent__privacy {
  margin: 8px 0 0;
}

.tw-consent__privacy a {
  color: var(--twc-mint-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tw-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 0 1 auto;
}

.tw-consent__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tw-consent__btn--primary {
  background: var(--twc-mint);
  color: #062319;
}

.tw-consent__btn--primary:hover,
.tw-consent__btn--primary:focus-visible {
  background: var(--twc-mint-600);
  color: #fff;
}

.tw-consent__btn--ghost {
  background: transparent;
  border-color: var(--twc-line);
  color: var(--twc-ink-2);
}

.tw-consent__btn--ghost:hover,
.tw-consent__btn--ghost:focus-visible {
  border-color: var(--twc-ink-2);
}

.tw-consent__btn--link {
  background: transparent;
  color: var(--twc-mint-600);
  padding-left: 8px;
  padding-right: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.tw-consent__panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: min(480px, calc(100vw - 32px));
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--twc-bg);
  border-radius: 12px;
  border: 1px solid var(--twc-line);
  box-shadow: 0 16px 48px rgba(11, 15, 13, 0.18);
}

.tw-consent__panel[hidden] {
  display: none !important;
}

.tw-consent__panel-inner {
  padding: 20px;
}

.tw-consent__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tw-consent__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--twc-mute);
  cursor: pointer;
  padding: 0 4px;
}

.tw-consent__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tw-consent__cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--twc-line);
  border-radius: 10px;
}

.tw-consent__cat-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tw-consent__cat-text strong {
  color: var(--twc-ink);
  font-weight: 600;
}

.tw-consent__cat-text span {
  color: var(--twc-mute);
  font-size: 0.875rem;
}

.tw-consent__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tw-consent__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tw-consent__slider {
  position: absolute;
  inset: 0;
  background: #c5ccc8;
  border-radius: 26px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.tw-consent__slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.tw-consent__switch input:checked + .tw-consent__slider {
  background: var(--twc-mint);
}

.tw-consent__switch input:checked + .tw-consent__slider::before {
  transform: translateX(18px);
}

.tw-consent__switch--locked .tw-consent__slider {
  background: var(--twc-mint);
  opacity: 0.7;
  cursor: not-allowed;
}

.tw-consent__switch--locked input:checked + .tw-consent__slider::before {
  transform: translateX(18px);
}

.tw-consent__panel-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.tw-consent-footer-link {
  text-align: center;
  margin: 12px 0 24px;
  padding: 0 16px;
}

.tw-consent-footer-link__btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--tw-mute, #6B7470);
  font: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

.tw-consent-footer-link__btn:hover,
.tw-consent-footer-link__btn:focus-visible {
  color: var(--tw-mint-600, #1FB37C);
}

@media (max-width: 640px) {
  .tw-consent__actions {
    width: 100%;
  }

  .tw-consent__btn--primary,
  .tw-consent__btn--ghost {
    flex: 1 1 auto;
    text-align: center;
  }
}
