/* =====================================================
   כיפכף אירועים — Cookie Consent CSS v3.0
   עיצוב: פס תחתון + פופ-אפ
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }

/* ===== PAS TACHTON — הפס הדק ===== */
#kk-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(90deg, #1a1a2e 0%, #2a1040 50%, #1a1a2e 100%);
  border-top: 2px solid #E5005A;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 32px;
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
  transform: translateY(100%);
  transition: transform .5s cubic-bezier(.34,1.26,.64,1);
  box-shadow: 0 -4px 24px rgba(229,0,90,.18);
  /* מחשב: ממש בתחתית */
  margin-bottom: 0;
}

/* מובייל: מעל פס הווצאפ (52px) */
@media (max-width: 768px) {
  #kk-bar {
    bottom: 65px;
    border-radius: 12px 12px 0 0;
  }
}

#kk-bar.kk-show { transform: translateY(0); }

.kk-bar-right {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}

.kk-bar-cookie { font-size: 20px; flex-shrink: 0; }

.kk-bar-text {
  font-size: 13px; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
}

.kk-bar-text strong { color: #fff; font-weight: 800; }
.kk-bar-text a {
  color: #E5005A; text-decoration: none; font-weight: 700;
  border-bottom: 1px solid rgba(229,0,90,.4);
}
.kk-bar-text a:hover { border-color: #E5005A; }

.kk-bar-btns {
  display: flex; gap: 8px; flex-shrink: 0; align-items: center;
}

.kk-bbar {
  border: none; border-radius: 50px;
  font-family: 'Heebo', Arial, sans-serif;
  font-weight: 800; font-size: 12.5px;
  cursor: pointer; padding: 8px 18px;
  transition: all .2s ease;
  white-space: nowrap; line-height: 1;
}

.kk-bbar-primary {
  background: linear-gradient(135deg, #E5005A, #c4004d);
  color: #fff;
  box-shadow: 0 3px 10px rgba(229,0,90,.35);
}
.kk-bbar-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(229,0,90,.45); }

.kk-bbar-ghost {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.25);
}
.kk-bbar-ghost:hover { border-color: rgba(255,255,255,.6); color: #fff; }

.kk-bbar-settings {
  background: transparent;
  color: rgba(255,255,255,.5);
  border: none;
  font-size: 18px;
  padding: 6px 10px;
}
.kk-bbar-settings:hover { color: #E5005A; }

/* ===== OVERLAY ===== */
#kk-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

#kk-overlay.kk-ready {
  display: flex;
}

#kk-overlay.kk-on {
  opacity: 1;
  pointer-events: all;
}

/* ===== POPUP BOX ===== */
#kk-box {
  background: #ffffff;
  border-radius: 24px;
  max-width: 640px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.35), 0 4px 20px rgba(229,0,90,.12);
  transform: scale(.9) translateY(20px);
  transition: transform .4s cubic-bezier(.34,1.26,.64,1), opacity .35s ease;
  opacity: 0;
}

#kk-overlay.kk-on #kk-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Header */
#kk-hdr {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
  padding: 28px 32px 24px;
  position: relative;
  overflow: hidden;
}

#kk-hdr::before {
  content: '';
  position: absolute; top: -50px; left: -30px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(229,0,90,.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Close button */
#kk-close {
  position: absolute; top: 16px; left: 16px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.1);
  border: none; border-radius: 50%;
  color: rgba(255,255,255,.7);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; line-height: 1;
  font-family: Arial, sans-serif;
}
#kk-close:hover { background: rgba(229,0,90,.3); color: #fff; }

.kk-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(229,0,90,.12);
  border: 1px solid rgba(229,0,90,.25);
  border-radius: 50px;
  padding: 5px 13px;
  margin-bottom: 12px;
}

.kk-dot {
  width: 7px; height: 7px;
  background: #E5005A; border-radius: 50%;
  animation: kkPulse 2s ease-in-out infinite;
}

@keyframes kkPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.5); opacity: .7; }
}

.kk-badge span { font-size: 11.5px; font-weight: 700; color: #E5005A; }

.kk-ttl {
  font-size: 22px; font-weight: 900; color: #fff;
  line-height: 1.3; margin-bottom: 6px;
}
.kk-ttl em { color: #E5005A; font-style: normal; }
.kk-sub { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.6; }

/* Body */
#kk-body { padding: 24px 32px 8px; }

.kk-stxt {
  font-size: 14.5px; color: #4a4a6a; line-height: 1.85; margin-bottom: 4px;
}
.kk-stxt a {
  color: #E5005A; text-decoration: none; font-weight: 700;
  border-bottom: 1.5px solid rgba(229,0,90,.25);
  transition: border-color .2s;
}
.kk-stxt a:hover { border-color: #E5005A; }

/* Advanced */
#kk-adv { display: none; }
#kk-adv.kk-show { display: block; }

.kk-cats {
  display: flex; flex-direction: column; gap: 9px;
  margin-top: 8px; margin-bottom: 4px;
}

.kk-cat {
  display: flex; align-items: center; gap: 13px;
  background: #f8f9fc;
  border: 1.5px solid #eaecf2;
  border-radius: 13px;
  padding: 12px 15px;
  transition: border-color .2s, background .2s;
}
.kk-cat:hover { border-color: #E5005A; background: #fff; }

.kk-ico {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.cat-req .kk-ico { background: rgba(229,0,90,.09); }
.cat-ana .kk-ico { background: rgba(26,26,46,.07); }
.cat-mkt .kk-ico { background: rgba(99,102,241,.09); }

.kk-inf { flex: 1; min-width: 0; }
.kk-nm {
  font-size: 13px; font-weight: 800; color: #1a1a2e;
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 2px; flex-wrap: wrap;
}
.kk-req-tag {
  font-size: 9.5px; font-weight: 700; color: #E5005A;
  background: rgba(229,0,90,.09); border-radius: 50px; padding: 1px 7px;
}
.kk-dsc { font-size: 11.5px; color: #7b87a0; line-height: 1.5; }

/* Toggle */
.kk-tgl {
  position: relative; display: block;
  width: 46px; height: 25px;
  cursor: pointer; flex-shrink: 0;
}
.kk-tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.kk-trk {
  position: absolute; inset: 0;
  background: #dde1ea; border-radius: 50px;
  transition: background .3s;
}
.kk-tgl input:checked  ~ .kk-trk { background: #E5005A; }
.kk-tgl input:disabled ~ .kk-trk { background: #E5005A; opacity: .65; cursor: not-allowed; }
.kk-thm {
  position: absolute; top: 2.5px; right: 2.5px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  transition: right .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
}
.kk-tgl input:checked ~ .kk-trk .kk-thm { right: calc(100% - 22.5px); }

/* Actions */
#kk-acts {
  display: flex; gap: 8px;
  padding: 16px 32px 22px;
}

.kk-btn {
  flex: 1;
  border: none; border-radius: 50px;
  font-family: 'Heebo', Arial, sans-serif;
  font-weight: 800; font-size: 13.5px;
  cursor: pointer; padding: 13px 16px;
  transition: all .2s ease;
  white-space: nowrap; line-height: 1;
  text-align: center;
}
.kk-primary {
  background: linear-gradient(135deg,#E5005A,#c4004d);
  color: #fff; box-shadow: 0 4px 14px rgba(229,0,90,.28);
}
.kk-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(229,0,90,.38); }

.kk-dark { background: #1a1a2e; color: #fff; }
.kk-dark:hover { background: #2d2d4e; transform: translateY(-2px); }

.kk-out {
  background: #f0f2f7; color: #1a1a2e;
  border: 2px solid #d0d4e0;
  flex: 0 0 auto; padding: 13px 20px;
}
.kk-out:hover { background: #e2e6f0; border-color: #1a1a2e; color: #1a1a2e; }

.kk-save {
  background: #E5005A; color: #fff;
  box-shadow: 0 4px 14px rgba(229,0,90,.28);
}
.kk-save:hover { transform: translateY(-2px); }

/* Footer */
#kk-ftr {
  background: #f6f7fb;
  border-top: 1px solid #eaecf2;
  padding: 11px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.kk-flinks { display: flex; gap: 14px; flex-wrap: wrap; }
.kk-flinks a {
  font-size: 11px; color: #9ca3af;
  text-decoration: none; font-weight: 500; transition: color .2s;
}
.kk-flinks a:hover { color: #E5005A; }
.kk-gdpr {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: #b0b8c9; font-weight: 500;
}
.kk-gd { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; flex-shrink: 0; }

/* Mobile */
@media (max-width: 768px) {
  /* פס תחתון במובייל — 2 שורות */
  #kk-bar {
    padding: 10px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    bottom: 0;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
  }
  #kk-bar.kk-show {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  .kk-bar-right {
    justify-content: center;
  }
  .kk-bar-text {
    display: block;
    white-space: normal;
    text-align: center;
    font-size: 12px;
  }
  .kk-bar-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .kk-bbar {
    font-size: 12px;
    padding: 9px 16px;
    flex: 1;
    min-width: 80px;
    text-align: center;
  }
  .kk-bbar-settings {
    flex: 0 0 auto;
  }

  /* פופ-אפ במובייל */
  #kk-overlay { padding: 12px; align-items: flex-end; }
  #kk-box { border-radius: 20px 20px 16px 16px; max-height: 92vh; overflow-y: auto; }
  #kk-hdr, #kk-body, #kk-acts { padding-right: 18px; padding-left: 18px; }
  #kk-ftr { padding: 10px 18px; flex-direction: column; align-items: flex-start; }
  .kk-ttl { font-size: 18px; }
  #kk-acts { flex-wrap: wrap; gap: 8px; }
  .kk-btn { font-size: 13px; padding: 12px 10px; min-width: 0; }
  .kk-out { flex: 1; }
}
