/* Bosq Habitat CMP — Cookie Management Platform styles
   Shared across index + pillar pages */

.cmp {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  background: #faf9f5;
  border-top: 1px solid rgba(60,90,46,0.15);
  box-shadow: 0 -8px 32px rgba(27,32,22,0.12);
  padding: 1.5rem clamp(1.5rem,5vw,3rem);
  transform: translateY(110%);
  transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  max-width: 100vw;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.cmp.visible { transform: translateY(0); }
.cmp-text { font-size: 0.85rem; color: #3d4a35; line-height: 1.6; max-width: 720px; }
.cmp-text strong { color: #1b2016; font-weight: 500; }
.cmp-text p { margin: 0; }
.cmp-text a { color: #3c5a2e; text-decoration: underline; text-underline-offset: 2px; }
.cmp-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.cmp-btn {
  padding: 0.7rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: inherit;
  transition: all 180ms ease-out;
  white-space: nowrap;
}
.cmp-btn-primary { background: #3c5a2e; color: #f4f1ea; }
.cmp-btn-primary:hover { background: #5a7d48; }
.cmp-btn-secondary { background: transparent; color: #3c5a2e; border-color: #8da87a; }
.cmp-btn-secondary:hover { border-color: #3c5a2e; background: rgba(60,90,46,0.04); }
.cmp-btn-ghost { background: transparent; color: #6b7a60; padding: 0.7rem 1rem; }
.cmp-btn-ghost:hover { color: #3c5a2e; }
@media (max-width: 768px) {
  .cmp { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem; }
  .cmp-actions { justify-content: stretch; }
  .cmp-btn { flex: 1; text-align: center; }
  .cmp-btn-ghost { flex: 0 0 100%; order: 3; }
}

.cmp-modal {
  position: fixed; inset: 0;
  z-index: 9100;
  background: rgba(27,32,22,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.cmp-modal.open { display: flex; }
.cmp-modal-card {
  background: #faf9f5;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(27,32,22,0.3);
}
.cmp-modal h3 { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.4rem; color: #1b2016; margin: 0 0 0.8rem; font-weight: 400; }
.cmp-modal p.cmp-modal-lead { font-size: 0.9rem; color: #6b7a60; margin: 0 0 1.5rem; line-height: 1.6; }
.cmp-cat { padding: 1rem 0; border-top: 1px solid rgba(60,90,46,0.1); }
.cmp-cat-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cmp-cat h4 { font-size: 0.95rem; font-weight: 500; color: #1b2016; margin: 0; }
.cmp-cat p { font-size: 0.82rem; color: #6b7a60; line-height: 1.5; margin: 0.35rem 0 0; }
.cmp-cat .cmp-locked { font-size: 0.75rem; color: #6b7a60; font-style: italic; }
.cmp-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.cmp-switch input { opacity: 0; width: 0; height: 0; }
.cmp-switch .slider {
  position: absolute; inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: background 180ms ease-out;
  cursor: pointer;
}
.cmp-switch .slider::before {
  content: ''; position: absolute;
  height: 16px; width: 16px; left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 180ms ease-out;
}
.cmp-switch input:checked + .slider { background: #3c5a2e; }
.cmp-switch input:checked + .slider::before { transform: translateX(18px); }
.cmp-switch input:focus-visible + .slider { outline: 2px solid #c4a035; outline-offset: 2px; }
.cmp-modal-actions { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(60,90,46,0.1); display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 480px) {
  .cmp-modal-card { padding: 1.4rem; }
  .cmp-modal-actions { justify-content: stretch; }
  .cmp-modal-actions .cmp-btn { flex: 1; text-align: center; }
}
