.cookie-banner {
  position: fixed;
  left: 16px;
  right: auto;
  bottom: 16px;
  z-index: 100001;
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom left;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
}

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

.cookie-banner-inner {
  position: relative;
  max-width: none;
  margin: 0;
  background: var(--sand, #e7ddcc);
  border: 1px solid rgba(36, 26, 18, 0.14);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(36, 26, 18, 0.32);
  pointer-events: auto;
  color: var(--brown-deep, #241a12);
}

.cookie-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--brown-soft, #4a3826);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.cookie-close:hover {
  color: var(--brown-deep, #241a12);
  background: rgba(36, 26, 18, 0.06);
}

.cookie-banner h2 {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 28px 10px 0;
  color: var(--brown-deep, #241a12);
}

.cookie-banner p {
  margin: 0 0 16px;
  font-family: var(--font-mono, "Manrope", sans-serif);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--brown-soft, #4a3826);
}

.cookie-banner p a {
  color: var(--brown-deep, #241a12);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner p a:hover {
  color: var(--brown, #33261a);
}

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

.cookie-btn {
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 11px 18px;
  font-family: var(--font-mono, "Manrope", sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-btn-primary {
  background: var(--brown-deep, #241a12);
  color: var(--cream, #efe6d8);
}

.cookie-btn-primary:hover {
  background: var(--brown, #33261a);
}

.cookie-btn-ghost {
  background: transparent;
  color: var(--brown-deep, #241a12);
  border-color: rgba(36, 26, 18, 0.35);
}

.cookie-btn-ghost:hover {
  background: var(--brown-deep, #241a12);
  color: var(--cream, #efe6d8);
  border-color: var(--brown-deep, #241a12);
}

.cookie-settings {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(36, 26, 18, 0.14);
}

.cookie-settings.is-open {
  display: block;
}

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

.cookie-setting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(36, 26, 18, 0.1);
}

.cookie-setting:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cookie-setting h3 {
  margin: 0 0 4px;
  font-family: var(--font-mono, "Manrope", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-deep, #241a12);
}

.cookie-setting p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--brown-soft, #4a3826);
  line-height: 1.45;
}

.cookie-setting-always {
  font-family: var(--font-mono, "Manrope", sans-serif);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-soft, #4a3826);
  font-weight: 600;
  white-space: nowrap;
}

.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-toggle span {
  position: absolute;
  inset: 0;
  background: rgba(36, 26, 18, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--cream, #efe6d8);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.cookie-toggle input:checked + span {
  background: var(--accent, #d9d79a);
}

.cookie-toggle input:checked + span::after {
  transform: translateX(20px);
  background: var(--brown-deep, #241a12);
}

.cookie-footer-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-footer-link:hover {
  opacity: 0.75;
}

.cookie-fab {
  position: fixed;
  left: 14px;
  bottom: 18px;
  z-index: 100000;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(36, 26, 18, 0.35));
}

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

.cookie-fab:hover {
  background: transparent;
  border: none;
  transform: translateY(-2px) scale(1.06);
}

.cookie-fab:focus-visible {
  outline: 2px solid var(--accent, #d9d79a);
  outline-offset: 4px;
  border-radius: 50%;
}

.cookie-fab__img,
.cookie-fab svg {
  width: 48px;
  height: 48px;
  display: block;
  pointer-events: none;
}

.contact__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--brown-soft);
}

.contact__legal a,
.contact__legal .cookie-footer-link {
  color: var(--brown-soft);
}

.contact__legal a:hover,
.contact__legal .cookie-footer-link:hover {
  color: var(--brown-deep);
}

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

@media (max-width: 560px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .cookie-fab {
    left: 12px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }

  .cookie-fab__img,
  .cookie-fab svg {
    width: 42px;
    height: 42px;
  }

  .cookie-banner-inner {
    padding: 18px 16px;
  }

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

  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}
