/* =========================
   Cookie Banner (standalone)
   File: cookie-banner.css
   ========================= */

/* fallback למקרה שאין משתני צבע בעמוד */
:root {
  --primary: #2563eb;
  --secondary: #0ea5e9;
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  left: 16px !important;
  right: 16px !important;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;

  z-index: 99999;
  pointer-events: auto;

  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px 14px !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);

  display: flex;
  gap: 12px !important;
  align-items: center;
  justify-content: space-between;

  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;

  max-height: 34vh;
  overflow: hidden;
  flex-wrap: wrap;
}

.cookie-banner * {
  pointer-events: auto;
  box-sizing: border-box;
}

/* טקסט גדול יותר (לא משפיע על כפתורים) */
.cookie-banner__text {
  min-width: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.5;
  max-width: 980px;
  flex: 1 1 360px;
}

.cookie-banner__text a {
  color: var(--primary);
  text-decoration: underline;
}

/* שתי שורות (standard + webkit + fallback) */
.cookie-banner__text > div {
  overflow: hidden;

  /* Standard */
  line-clamp: 2;

  /* WebKit */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  /* Fallback */
  max-height: calc(1.5em * 2);
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.cookie-btn {
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;

  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;

  font-size: 14px; /* נשאר קטן יותר מהטקסט */
  white-space: nowrap;
}

.cookie-btn--primary {
  border: none;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
}

.cookie-btn--ghost {
  background: transparent;
}

/* hide cookie banner */
.cookie-banner.is-hidden,
.cookie-banner[hidden] {
  display: none !important;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 700px) {
  .cookie-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;

    padding: 10px 12px !important;
    gap: 10px !important;

    max-height: 30vh !important;
  }

  .cookie-banner__text {
    font-size: 15px !important;
    line-height: 1.45 !important;
    flex: 1 1 100%;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ממש מסכים קטנים: הופך לטור כדי שלא ימחץ */
@media (max-width: 380px) {
  .cookie-banner {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .cookie-banner__actions {
    justify-content: space-between;
  }

  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}
