/*
 * Cookie banner + "Cookie settings" link (markup in templates/index.html, shown/hidden by
 * map-assets/js/cookie-consent.js).
 * Small card in the bottom-left corner of the map on desktop (right of the filter sidebar), a panel along
 * the bottom on phones.
 * No overlay: the map stays fully usable while it shows.
 * z-index 9000: above the filter panel (1000) and list view, below the property popup overlay (9999)
 * and toasts (10001), so a listing someone opens is never covered.
 * The marketing site has its own copy of these styles (repos/marketing website/assets/css/cookie-consent.css).
 */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9000;
  width: 340px;
  max-width: calc(100% - 32px);
  padding: 16px;
  background: #fff;
  color: #222220;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__text {
  margin: 0 0 12px;
}

.cookie-banner__text a {
  color: inherit;
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: 8px;
}

/* Both buttons identical on purpose (EU rule: declining must be as easy as accepting) */
.cookie-banner__button {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--bs-primary, #1c7430);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.cookie-banner__button:hover {
  background: var(--bs-primary-hover, #165c28);
}

.cookie-banner__button:focus-visible {
  outline: 2px solid #222220;
  outline-offset: 2px;
}

/* Desktop: the filter sidebar (#filter-sidebar, 260px wide, list-view.css) sits on the left, so start just
   right of it instead of covering the keyword search. Collapsed sidebar (app.js sets body.sidebar-collapsed):
   back to the corner. Same 769px breakpoint as responsive.css. */
@media (min-width: 769px) {
  .cookie-banner {
    left: 276px;
  }

  body.sidebar-collapsed .cookie-banner {
    left: 16px;
  }
}

/* Phones: full width along the bottom, with a small margin */
@media (max-width: 575px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }
}

/* "Cookie settings" link next to the EN | NL switch in the filter panel footer (same look as .lang-link) */
.cookie-settings-link {
  padding: 4px 0;
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.cookie-settings-link:hover {
  color: var(--bs-primary, #1c7430);
  text-decoration: underline;
}
