/* ── Cookie Consent RTL ── */
:root {
  --cc-bg:           #ffffff;
  --cc-text:         #121212;
  --cc-muted:        #6b7280;
  --cc-outline:      #e5e7eb;
  --cc-shadow:       0 8px 32px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --cc-radius:       20px;
  --cc-switch-w:     48px;
  --cc-switch-h:     28px;
  --cc-thumb:        22px;
  --cc-pad:           3px;
  --btn-accept-bg:   #111827;
  --btn-accept-text: #ffffff;
  --btn-settings-bg:   transparent;
  --btn-settings-text: #111827;
  --btn-decline-bg:    transparent;
  --btn-decline-text:  #111827;
}

/* ירש פונט מהאתר (וורדפרס / אלמנטור) */
#ccrtl-root, #ccrtl-root * { font-family: inherit; box-sizing: border-box; }

#ccrtl-root { position: fixed; inset: 0; pointer-events: none; z-index: 999999; }

/* ── Card ── */
.cc-card {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000000;
  width: min(420px, calc(100vw - 32px));
  background: var(--cc-bg);
  border: 1px solid var(--cc-outline);
  border-radius: var(--cc-radius);
  padding: 22px 22px 18px;
  box-shadow: var(--cc-shadow);
  pointer-events: auto;
  direction: rtl;
  color: var(--cc-text);
  animation: cc-in .32s cubic-bezier(.22,.68,0,1.15) both;
}
@keyframes cc-in {
  from { transform: translateY(16px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── Emoji header ── */
.cc-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf0ff 100%);
  border-radius: 14px;
  height: 88px;
  margin-bottom: 14px;
  overflow: hidden;
}
.cc-emoji { font-size: 52px; line-height: 1; }

/* ── Text ── */
.cc-title {
  margin: 0 0 8px;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--cc-text);
}
.cc-body {
  margin: 0 0 18px;
  font-size: clamp(13px, 1.5vw, 14px);
  line-height: 1.75;
  color: var(--cc-muted);
}
.cc-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-link:focus-visible { outline: 2px solid #6d28d9; outline-offset: 2px; border-radius: 2px; }
.cc-switch input:focus-visible ~ .cc-track { outline: 3px solid #6d28d9; outline-offset: 2px; }

/* ── Buttons ── */
.cc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: 1.5px solid transparent;
  transition: transform .1s, box-shadow .18s, background .15s, color .15s;
  white-space: nowrap;
  line-height: 1.2;
}
.cc-btn:focus-visible { outline: 2px solid #6d28d9; outline-offset: 3px; }
.cc-btn:active { transform: scale(.96); }

.cc-btn-primary {
  background: var(--btn-accept-bg);
  color: var(--btn-accept-text);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.cc-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.22); }

.cc-btn-ghost-settings {
  background: var(--btn-settings-bg);
  color: var(--btn-settings-text);
  border-color: var(--cc-outline);
}
.cc-btn-ghost-settings:hover { background: #f3f4f6; }

.cc-btn-ghost-decline {
  background: var(--btn-decline-bg);
  color: var(--btn-decline-text);
  border-color: var(--cc-outline);
}
.cc-btn-ghost-decline:hover { background: #f3f4f6; }

/* ── Preferences panel ── */
.cc-prefs[hidden] { display: none; }
.cc-prefs {
  margin-top: 16px;
  border-top: 1px solid var(--cc-outline);
  padding-top: 14px;
}

.cc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
}
.cc-row + .cc-row { border-top: 1px dashed var(--cc-outline); }
.cc-row .cc-h { font-weight: 700; font-size: 14px; color: var(--cc-text); }
.cc-row .cc-d { font-size: 12px; color: var(--cc-muted); line-height: 1.5; margin-top: 3px; }

/* ── Toggle switch ── */
.cc-switch {
  position: relative;
  width: var(--cc-switch-w);
  height: var(--cc-switch-h);
  flex-shrink: 0;
}
.cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.cc-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .2s;
}
.cc-thumb {
  position: absolute;
  top: var(--cc-pad);
  left: var(--cc-pad);
  width: var(--cc-thumb);
  height: var(--cc-thumb);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: left .2s;
}
.cc-switch input:checked ~ .cc-track { background: #111827; }
.cc-switch input:checked ~ .cc-thumb { left: calc(100% - (var(--cc-thumb) + var(--cc-pad))); }
.cc-switch input:focus-visible ~ .cc-track { outline: 2px solid #6d28d9; outline-offset: 2px; }
.cc-switch.locked .cc-track { background: #111827; opacity: .55; }
.cc-switch.locked .cc-thumb { left: calc(100% - (var(--cc-thumb) + var(--cc-pad))); }
.cc-switch.locked input,
.cc-switch.locked .cc-track,
.cc-switch.locked .cc-thumb { cursor: not-allowed; }

.cc-prefs-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .cc-card {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    padding: 18px 16px 24px;
    max-height: 90svh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cc-btn  { flex: 1 1 auto; font-size: 13px; padding: 9px 14px; }
  .cc-actions { flex-wrap: wrap; }
  .cc-media { height: 64px; margin-bottom: 10px; }
  .cc-emoji { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-card { animation: none; }
  .cc-btn, .cc-track, .cc-thumb { transition: none; }
}


/* ════════════════════════════════════════════════════════
   Cookie Consent — Button styles by ID
   צבעים נלקחים מה-CSS variables שנקבעות ב-WP Admin
   ════════════════════════════════════════════════════════ */

/* ── איפוס בסיסי לכל הכפתורים ── */
button#cc-accept,
button#cc-settings,
button#cc-decline,
button#cc-save,
button#cc-allow-all,
button#cc-reject {
  display: inline-block !important;
  padding: 14px 24px !important;
  border-radius: 99px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* ── כפתור ראשי: קבל הכל ── */
/* רקע וטקסט מה-WP Admin */
button#cc-accept {
  background-color: var(--btn-accept-bg, #111827) !important;
  color: var(--btn-accept-text, #ffffff) !important;
  border: 2px solid var(--btn-accept-bg, #111827) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;
}
button#cc-accept:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.22) !important;
}
button#cc-accept:active { transform: scale(.97) !important; }

/* ── כפתור הגדרות ── */
/* border וטקסט מה-WP Admin (settings_text), רקע לבן */
button#cc-settings {
  background-color: #ffffff !important;
  color: var(--btn-settings-text, #111827) !important;
  border: 1.5px solid var(--btn-settings-text, #111827) !important;
}
button#cc-settings:hover {
  background-color: var(--btn-settings-text, #111827) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}
button#cc-settings:active { transform: scale(.97) !important; }

/* ── כפתור ביטול/חיוניים ── */
/* border וטקסט מה-WP Admin (decline_text), רקע לבן */
button#cc-decline {
  background-color: #ffffff !important;
  color: var(--btn-decline-text, #111827) !important;
  border: 1.5px solid var(--btn-decline-text, #111827) !important;
}
button#cc-decline:hover {
  background-color: var(--btn-decline-text, #111827) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}
button#cc-decline:active { transform: scale(.97) !important; }

/* ── כפתורי העדפות (בפאנל ההגדרות) ── */
button#cc-save {
  background-color: var(--btn-accept-bg, #111827) !important;
  color: var(--btn-accept-text, #ffffff) !important;
  border: 2px solid var(--btn-accept-bg, #111827) !important;
}
button#cc-save:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-2px) !important;
}

button#cc-allow-all {
  background-color: transparent !important;
  color: var(--btn-settings-text, #111827) !important;
  border: 1.5px solid var(--btn-settings-text, #111827) !important;
}
button#cc-allow-all:hover {
  background-color: var(--btn-settings-text, #111827) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

button#cc-reject {
  background-color: transparent !important;
  color: var(--btn-decline-text, #111827) !important;
  border: 1.5px solid var(--btn-decline-text, #111827) !important;
}
button#cc-reject:hover {
  background-color: var(--btn-decline-text, #111827) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}
