/* Willo consent banner — matches site aesthetic (cream, teal, warm). */

/* Default: mobile-first, full-width centered bottom. Ultra-compact. */
.willo-consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 9999;
  background: #FEFDFB;
  border: 1px solid #EDEAE6;
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow: 0 14px 36px rgba(74, 63, 53, 0.12), 0 2px 6px rgba(74, 63, 53, 0.05);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #4A3F35;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

/* Desktop: pin to bottom-left so the smart app banner (bottom-center) has room. */
@media (min-width: 900px) {
  .willo-consent {
    left: 20px;
    right: auto;
    bottom: 20px;
    max-width: 360px;
    margin: 0;
    padding: 14px 18px 12px;
  }
}

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

.willo-consent__title {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 15px;
  color: #4A3F35;
  margin: 0 0 3px;
  letter-spacing: -0.005em;
}

.willo-consent__text {
  color: #7A6E60;
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.willo-consent__link,
.willo-consent__text a {
  color: #7A6E60;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: #D9D5D0;
  cursor: pointer;
}
.willo-consent__link:hover,
.willo-consent__text a:hover { color: #4A3F35; }

.willo-consent__actions {
  display: flex;
  gap: 8px;
}

.willo-consent__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  flex: 1;
}

.willo-consent__btn:active { transform: translateY(1px); }

.willo-consent__btn--accept {
  background: #567039;
  color: #FEFDFB;
}
.willo-consent__btn--accept:hover { background: #3F5528; }

.willo-consent__btn--decline {
  background: transparent;
  color: #4A3F35;
  border-color: #EDEAE6;
}
.willo-consent__btn--decline:hover {
  background: #F5F3F0;
  border-color: #D9D5D0;
}

/* legacy settings button style retained for the granular "Save preferences" button in panel */
.willo-consent__btn--settings {
  background: transparent;
  color: #7A6E60;
  border: none;
  font-size: 12.5px;
}
.willo-consent__btn--settings:hover { color: #4A3F35; }

/* Settings panel (expanded view) */
.willo-consent__panel {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #EDEAE6;
}
.willo-consent.is-expanded .willo-consent__panel { display: block; }

.willo-consent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 13.5px;
}

.willo-consent__row-label {
  color: #4A3F35;
  font-weight: 500;
}
.willo-consent__row-desc {
  color: #7A6E60;
  font-size: 12.5px;
  margin-top: 2px;
}

.willo-consent__toggle {
  width: 40px;
  height: 22px;
  background: #D9D5D0;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease;
  border: none;
  padding: 0;
}
.willo-consent__toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #FEFDFB;
  border-radius: 50%;
  transition: transform 0.16s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.willo-consent__toggle[aria-checked="true"] { background: #567039; }
.willo-consent__toggle[aria-checked="true"]::after { transform: translateX(18px); }
.willo-consent__toggle[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Footer "Cookie preferences" link inherits the site's footer link style.
   No floating widget — users reopen the banner via the footer link on any page. */

@media (max-width: 540px) {
  .willo-consent {
    padding: 14px 15px 12px;
    border-radius: 14px;
  }
  .willo-consent__title { font-size: 14.5px; }
  .willo-consent__text { font-size: 12.5px; }
  .willo-consent__btn {
    padding: 10px 14px;  /* Comfortable thumb target */
    font-size: 13px;
  }
  .willo-consent__toggle {
    width: 42px;
    height: 24px;
  }
  .willo-consent__toggle::after {
    width: 20px;
    height: 20px;
  }
  .willo-consent__toggle[aria-checked="true"]::after { transform: translateX(18px); }
}

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