/* Cookie consent banner and preferences modal - BetterWell Pro marketing site */

/* ---- Banner ---- */
.bwp-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  padding: 16px 20px;
  background: var(--navy, #162D50);
  border-top: 1px solid var(--border, rgba(245, 247, 255, 0.12));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.45;
  animation: bwp-cookie-slide-up 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes bwp-cookie-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bwp-cookie-banner .bwp-cookie-banner-inner {
  max-width: var(--maxw, 1200px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.bwp-cookie-banner p {
  margin: 0;
  flex: 1 1 280px;
  color: var(--text, #F5F7FF);
  opacity: 0.95;
}

.bwp-cookie-banner a {
  color: var(--teal, #007A8A);
  text-decoration: underline;
}

.bwp-cookie-banner a:hover {
  opacity: 0.9;
}

.bwp-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bwp-cookie-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.bwp-cookie-btn:hover {
  opacity: 0.9;
}

.bwp-cookie-btn:focus {
  outline: 2px solid var(--teal, #007A8A);
  outline-offset: 2px;
}

.bwp-cookie-btn-accept {
  background: var(--teal, #007A8A);
  color: #fff;
}

.bwp-cookie-btn-reject {
  background: transparent;
  color: var(--text, #F5F7FF);
  border: 1px solid var(--border, rgba(245, 247, 255, 0.12));
}

.bwp-cookie-btn-prefs {
  background: rgba(245, 247, 255, 0.1);
  color: var(--text, #F5F7FF);
}

/* ---- Preferences modal ---- */
.bwp-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: bwp-cookie-fade-in 0.25s ease both;
}

@keyframes bwp-cookie-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bwp-cookie-modal-overlay[aria-hidden="true"] {
  display: none;
}

.bwp-cookie-modal {
  background: var(--navy, #162D50);
  border-radius: var(--radius, 18px);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border, rgba(245, 247, 255, 0.12));
}

.bwp-cookie-modal h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--text, #F5F7FF);
}

.bwp-cookie-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border, rgba(245, 247, 255, 0.12));
}

.bwp-cookie-modal-header p {
  margin: 0;
  font-size: 14px;
  color: var(--muted, rgba(245, 247, 255, 0.72));
  line-height: 1.5;
}

.bwp-cookie-modal-body {
  padding: 20px 24px;
}

.bwp-cookie-category {
  padding: 14px 0;
  border-bottom: 1px solid rgba(245, 247, 255, 0.08);
}

.bwp-cookie-category:last-of-type {
  border-bottom: none;
}

.bwp-cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.bwp-cookie-category-header label {
  font-weight: 500;
  color: var(--text, #F5F7FF);
  cursor: pointer;
  flex: 1;
}

.bwp-cookie-category-desc {
  font-size: 13px;
  color: var(--muted, rgba(245, 247, 255, 0.72));
  line-height: 1.45;
  margin: 0;
}

.bwp-cookie-category.bwp-cookie-necessary .bwp-cookie-category-header label {
  cursor: default;
}

/* Toggle - simple checkbox styled as switch */
.bwp-cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border: none;
  background: rgba(245, 247, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.bwp-cookie-toggle[aria-checked="true"] {
  background: var(--teal, #007A8A);
}

.bwp-cookie-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.bwp-cookie-toggle[aria-checked="true"]::after {
  transform: translateX(20px);
}

.bwp-cookie-toggle:disabled {
  cursor: default;
  opacity: 0.7;
}

.bwp-cookie-modal-actions {
  padding: 16px 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.bwp-cookie-modal-actions .bwp-cookie-btn {
  min-width: 120px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bwp-cookie-banner {
    animation: none;
  }
  .bwp-cookie-modal-overlay {
    animation: none;
  }
  .bwp-cookie-btn,
  .bwp-cookie-toggle {
    transition: none;
  }
}
