/* immoHouse — RODO cookie consent banner. Matches the editorial design system
   (Archivo, navy #2C4FB0, gold #C9A23B, squared radii). Namespaced .imh-cookie. */

.imh-cookie {
  position: fixed;
  left: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 1000;
  max-width: 520px;
  background: #fff;
  border: 1px solid #E8E8E6;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(20, 22, 26, .16);
  font-family: 'Archivo', system-ui, sans-serif;
  color: #585B63;
  padding: 22px 24px;
  transform: translateY(16px);
  opacity: 0;
  visibility: hidden;
  transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .28s, visibility .28s;
}
.imh-cookie.is-open { transform: none; opacity: 1; visibility: visible; }

.imh-cookie__head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.imh-cookie__icon {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: #EEF2FE; color: #2C4FB0;
  display: flex; align-items: center; justify-content: center;
}
.imh-cookie__icon svg { width: 20px; height: 20px; }
.imh-cookie__title {
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.05rem;
  letter-spacing: -.02em; color: #16181D; margin: 0;
}
.imh-cookie__text { font-size: .92rem; line-height: 1.55; margin: 0 0 16px; color: #585B63; }
.imh-cookie__text a { color: #2C4FB0; font-weight: 600; text-decoration: none; }
.imh-cookie__text a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* category toggles (settings panel) */
.imh-cookie__cats { display: none; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.imh-cookie.is-settings .imh-cookie__cats { display: flex; }
.imh-cookie__cat {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: #F4F4F2; border: 1px solid #E8E8E6; border-radius: 8px; padding: 12px 14px;
}
.imh-cookie__cat-info { min-width: 0; }
.imh-cookie__cat-name { font-weight: 600; font-size: .9rem; color: #16181D; margin: 0 0 2px; }
.imh-cookie__cat-desc { font-size: .8rem; line-height: 1.4; color: #8B8E96; margin: 0; }

/* switch */
.imh-cookie__switch { position: relative; flex-shrink: 0; width: 40px; height: 23px; }
.imh-cookie__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.imh-cookie__track {
  position: absolute; inset: 0; border-radius: 999px; background: #DADAD7;
  transition: background .18s; pointer-events: none;
}
.imh-cookie__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20,22,26,.25);
  transition: transform .18s;
}
.imh-cookie__switch input:checked + .imh-cookie__track { background: #2C4FB0; }
.imh-cookie__switch input:checked + .imh-cookie__track::after { transform: translateX(17px); }
.imh-cookie__switch input:disabled + .imh-cookie__track { background: #97ABEC; cursor: not-allowed; }
.imh-cookie__switch input:focus-visible + .imh-cookie__track { box-shadow: 0 0 0 3px rgba(44,79,176,.25); }

/* actions */
.imh-cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.imh-cookie__btn {
  flex: 1 1 auto; min-width: 120px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: .9rem;
  border-radius: 6px; padding: 11px 16px; cursor: pointer; border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
  text-decoration: none;
}
.imh-cookie__btn--primary { background: #2C4FB0; color: #fff; }
.imh-cookie__btn--primary:hover { background: #1E3577; transform: translateY(-1px); }
.imh-cookie__btn--ghost { background: #fff; color: #2C4FB0; border-color: #DADAD7; }
.imh-cookie__btn--ghost:hover { border-color: #2C4FB0; background: #EEF2FE; }
.imh-cookie__btn--link { background: none; color: #585B63; border: none; flex: 0 0 auto; min-width: 0; padding: 11px 8px; }
.imh-cookie__btn--link:hover { color: #16181D; }

@media (max-width: 480px) {
  /* Compact bottom strip — must NOT bury the page CTA/price on mobile.
     Accept + Reject share a row; Ustawienia is a slim link; height capped. */
  .imh-cookie { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; max-height: 78vh; overflow-y: auto; }
  .imh-cookie__head { margin-bottom: 8px; }
  .imh-cookie__text { font-size: .84rem; line-height: 1.45; margin-bottom: 12px; }
  .imh-cookie__actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .imh-cookie__btn { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 10px 12px; font-size: .86rem; }
  .imh-cookie__btn--link { flex: 1 1 100%; order: 3; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .imh-cookie { transition: none; }
}
