/* ============================================================================
 *  nahash.co.il  |  public/css/consent.css
 *  🍪 באנר הסכמת קוקיז (Cookie Consent).
 *  ---------------------------------------------------------------------------
 *  • כל המחלקות בתחילית ck- — אפס דריסה של styles.css / design-2026.css.
 *  • משתמש במשתני העיצוב הקיימים (--panel, --line-soft, --radius, --surface),
 *    ולכן מתאים את עצמו אוטומטית לנושא הבהיר/כהה של ה-Theme Studio.
 *  • 🔴 יושב **מעל** סרגל החיוג (‎#call-bar, z-index:95) ולא מכסה אותו —
 *    כפתור החירום הוא הדבר החשוב במסך.
 *  ========================================================================== */

.ck-host {
  position: fixed;
  inset-inline: 0;
  inset-block-end: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 96;                     /* מעל ה-callbar (95), מתחת ל-toasts (300) */
  display: flex;
  justify-content: center;
  padding-inline: 0.75rem;
  pointer-events: none;            /* לא חוסם לחיצות על התוכן שמאחור */
}

/* כשסרגל החיוג מוצג — הבאנר עולה מעליו */
body.has-callbar .ck-host {
  inset-block-end: calc(var(--callbar-h, 104px) + env(safe-area-inset-bottom) + 0.6rem);
}

.ck-banner {
  pointer-events: auto;
  width: min(980px, 100%);
  border-radius: var(--radius, 18px);
  border: 1px solid var(--line-soft);
  background: var(--surface, #fff);
  box-shadow:
    0 26px 60px -30px color-mix(in srgb, var(--text) 45%, transparent),
    0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  animation: ck-in 0.42s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) both;
}

@keyframes ck-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.ck-banner__in {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
}

.ck-banner__ico {
  font-size: 1.6rem;
  line-height: 1;
  flex: 0 0 auto;
}

.ck-banner__body { flex: 1 1 auto; min-width: 0; }

.ck-banner__title {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: var(--text);
}

.ck-banner__text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-dim, var(--text-mute));
}

.ck-banner__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ck-banner__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mute);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.ck-banner__link:hover { color: var(--neon, var(--brand)); }

/* ------------------------------ כפתור הפוטר ------------------------------ */

.footer__consent {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out, ease), color 0.25s var(--ease-out, ease);
  /* 🔴 לא .cookie-note — זו המחלקה הישנה שמוסתרת במובייל,
     ואסור שדרך ביטול ההסכמה תיעלם במסכים קטנים. */
}
.footer__consent:hover,
.footer__consent:focus-visible {
  border-color: #fff;
  color: #fff;
}

/* ------------------------------ מובייל ------------------------------ */

@media (max-width: 720px) {
  .ck-banner__in {
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
  }
  /* האייקון והטקסט באותה שורה — גובה הבאנר נשאר קטן */
  .ck-banner__body { order: 1; flex: 1 1 70%; }
  .ck-banner__ico { order: 0; }
  .ck-banner__actions {
    order: 2;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .ck-banner__actions .btn {
    width: 100%;
    justify-content: center;
    padding-inline: 0.6rem;
    text-align: center;
  }
  .ck-banner__link {
    grid-column: 1 / -1;
    text-align: center;
    white-space: normal;
  }
}

/* ------------------------------ נגישות ותנועה ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .ck-banner { animation: none; }
}

@media print {
  .ck-host { display: none !important; }
}
