.ap-cookie[hidden], .ap-cookie-settings[hidden] { display: none !important; }

.ap-cookie {
  position: fixed;
  z-index: 950;
  inset-inline-end: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(440px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid #b9c8bd;
  border-radius: 12px;
  background: #fff;
  color: #173e35;
  box-shadow: 0 8px 30px rgb(16 43 32 / 16%);
  font: 14px/1.5 system-ui, sans-serif;
}

.ap-cookie h2 { margin: 0 0 4px; font: 650 19px/1.25 system-ui, sans-serif; color: inherit; }
.ap-cookie p { margin: 0 0 10px; color: #3e564b; }
.ap-cookie-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ap-cookie button {
  min-height: 44px;
  padding: 6px;
  border: 1px solid #839c8a;
  border-radius: 6px;
  background: #f3f7f2;
  color: #173e35;
  font: 650 13px/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.ap-cookie button:hover { background: #e5efe5; }
.ap-cookie :focus-visible, .footer .ap-cookie-reopen:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.ap-cookie-settings { margin-top: 10px; padding-top: 8px; border-top: 1px solid #d9e3db; }
.ap-cookie-settings label { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; min-height: 44px; cursor: pointer; }
.ap-cookie-settings input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: #285b44; }
.ap-cookie-settings small { display: block; color: #3e564b; font-size: 13px; }
.ap-cookie-settings button { width: 100%; margin-top: 4px; }
.ap-cookie-info { margin-top: 8px; }
.ap-cookie-info summary { width: fit-content; padding: 7px 0; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ap-cookie-info p { font-size: 13px; }
.ap-cookie-info a { color: inherit; text-decoration: underline; }
.footer .ap-cookie-reopen { min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 600px) {
  .ap-cookie { inset-inline-end: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); max-height: calc(100dvh - 24px); padding: 13px; }
}

@media (max-width: 800px) {
  body:has(.mobile-contact) .ap-cookie { bottom: calc(78px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)); }
}
