/* Cookie Consent Popup */
:root {
  --cc-green: #19502E;
  --cc-green-dark: #133f24;
}

.cookie-consent-modal {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 1000000; /* above the home page promo popup (#bannerPopupModal, z-index 999999) */
  max-width: 480px;
  width: calc(100% - 48px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  color: #2E2E2E;
  font-family: "Montserrat", sans-serif;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: 0.35s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-consent-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-consent-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #2E2E2E;
  margin-bottom: 8px;
}

.cookie-consent-link {
  display: inline-block;
  color: var(--cc-green);
  text-decoration: underline;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.cookie-consent-link:hover { color: #75a47f; }
.cookie-consent-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-btn, .cookie-btn-save {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: 0.25s ease;
}

.cookie-btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.cookie-btn-outline {
  background: #f7f9f8;
  border: 1px solid #dbe5df;
  color: #334d3b;
}

.cookie-btn-outline:hover {
  background: #eaf1ed;
  border-color: #b7cebf;
  color: var(--cc-green);
}

.cookie-btn-primary, .cookie-btn-save {
  background: var(--cc-green);
  border: 1px solid var(--cc-green);
  color: #fff;
  box-shadow: 0 4px 10px rgba(25,80,46,0.25);
}

.cookie-btn-primary:hover, .cookie-btn-save:hover {
  background: var(--cc-green-dark);
  border-color: var(--cc-green-dark);
  color: #fff;
}

.cookie-preferences-panel {
  display: none;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7ece9;
}

.cookie-preferences-panel.active { display: block; }
.cookie-pref-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f2;
}

.cookie-pref-item:last-child { border-bottom: none; }
.cookie-pref-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cookie-pref-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a2a1f;
  margin: 0;
}

.cookie-pref-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--cc-green);
}

.cookie-pref-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #2E2E2E;
  margin: 0;
}

.cookie-pref-actions {
  margin-top: 16px;
  padding-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Switches */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
}

.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-switch input:checked + .cookie-slider { background: var(--cc-green); }
.cookie-switch input:checked + .cookie-slider:before { transform: translateX(20px); }

/* Responsive */
@media (max-width: 768px) {
  .cookie-consent-buttons { flex-direction: column; }
  .cookie-btn, .cookie-btn-save { width: 100%; text-align: center; }
}

@media (max-width: 575px) {
  .cookie-consent-modal {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 16px 18px;
    border-radius: 14px;
    max-height: 80dvh;
  }

  .cookie-consent-text {
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 6px;
  }

  .cookie-consent-link {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .cookie-btn {
    padding: 9px 12px;
    font-size: 11.5px;
  }
}
