/* Cookie consent — cards by APPQ */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow:
    0 18px 48px rgba(17, 17, 17, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

.cookie-banner-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}

.cookie-banner-text a {
  color: #111;
  font-weight: 600;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-banner-actions .c-btn,
.cookie-banner-actions .cookie-btn-ghost,
.cookie-banner-actions .cookie-btn-secondary {
  flex: 1 1 auto;
  min-height: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-family: inherit;
}

.cookie-btn-ghost {
  background: transparent;
  border: 1px solid rgba(17, 17, 17, 0.12);
  color: #111;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.cookie-btn-ghost:hover {
  background: rgba(17, 17, 17, 0.04);
  border-color: rgba(17, 17, 17, 0.2);
}

.cookie-btn-secondary {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.cookie-btn-secondary:hover {
  opacity: 0.88;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 17, 17, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.cookie-prefs.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-prefs-panel {
  width: min(100%, 480px);
  max-height: min(88vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 22px 22px 18px 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.22);
  padding: 22px 20px 18px;
  transform: translateY(24px);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-prefs.is-open .cookie-prefs-panel {
  transform: translateY(0);
}

.cookie-prefs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cookie-prefs-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.cookie-prefs-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.06);
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cookie-prefs-close:hover {
  background: rgba(17, 17, 17, 0.1);
}

.cookie-prefs-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}

.cookie-pref-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.cookie-pref-row:last-of-type {
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  margin-bottom: 16px;
}

.cookie-pref-label {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.cookie-pref-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #666;
}

.cookie-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d8d8d4;
  cursor: pointer;
  transition: background 180ms ease;
}

.cookie-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease;
}

.cookie-switch input:checked + span {
  background: #111;
}

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

.cookie-switch input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--accent, #c8ff1a);
}

.cookie-switch input:disabled + span::after {
  transform: translateX(18px);
}

.cookie-prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-prefs-actions .c-btn,
.cookie-prefs-actions .cookie-btn-secondary,
.cookie-prefs-actions .cookie-btn-ghost {
  flex: 1 1 140px;
  min-height: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-family: inherit;
}

.cookie-manage-cta {
  margin: 0 0 20px !important;
}

.cookie-fab {
  position: fixed;
  right: 16px;
  left: auto;
  bottom: 16px;
  z-index: 10040;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12);
  color: #111;
  cursor: pointer;
  display: none;
  place-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cookie-fab.is-visible {
  display: grid;
}

.create-page .cookie-fab {
  display: none !important;
}

.public-card-page .cookie-fab,
.public-card-page .cookie-banner {
  display: none !important;
}

.cookie-fab:hover {
  background: #fff;
}

.cookie-fab svg {
  width: 18px;
  height: 18px;
}

.footer-cookie-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: left;
}

.footer-cookie-link:hover {
  color: var(--white, #fff);
  text-decoration: none;
}

@media (min-width: 720px) {
  .cookie-banner {
    left: 24px;
    right: auto;
    bottom: 24px;
    margin: 0;
  }

  .cookie-prefs {
    align-items: center;
  }

  .cookie-prefs-panel {
    border-radius: 22px;
  }

  .cookie-fab {
    right: 24px;
    left: auto;
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-prefs,
  .cookie-prefs-panel {
    transition: none;
  }
}
