/* Basic accessible styling — ניתן להתאים עיצוב לפי הצורך */
#scb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#scb-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Special styling for privacy policy page - less intrusive */
#scb-overlay.visible.privacy-page {
  background: rgba(0,0,0,0.15);
  pointer-events: none; /* Allow clicking through to content */
}

#scb-overlay.visible.privacy-page + #scb-banner {
  pointer-events: auto; /* But keep banner interactive */
}

#scb-banner {
  --scb-bg: #ffffff;
  --scb-fg: #222222;
  --scb-primary: #0b74de;
  --scb-primary-hover: color-mix(in srgb, var(--scb-primary) 80%, black);
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  background: var(--scb-bg);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  padding: 16px;
  color: var(--scb-fg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#scb-banner.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scb-content { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.scb-text { 
  font-size: 14px; 
  line-height: 1.4; 
}

/* Privacy note styling */
.scb-privacy-note {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  color: #0c5460;
  font-size: 12px;
}

.scb-controls { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

/* Defensive `!important` against theme-level button resets that override
   color/background/border/border-radius on `button` (seen on irelandisrael
   where the theme made secondary buttons white-on-white). */
.scb-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  min-height: 36px !important;
  border-radius: 6px !important;
  border: 1px solid #ccc !important;
  background: #f7f7f7 !important;
  color: #222 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  transition: all 0.2s ease;
  appearance: none !important;
  -webkit-appearance: none !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}

/* Inner spans (.scb-btn-text wraps the label on Accept/Reject; absent on
   Preferences). Themes sometimes target span inside button — lock its
   typography so the three buttons render at identical size. */
.scb-btn > span,
.scb-btn .scb-btn-text,
.scb-btn .scb-btn-loading {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

.scb-btn:hover {
  background: #e9e9e9 !important;
  border-color: #999 !important;
  color: #222 !important;
}

.scb-btn-primary,
.scb-btn-primary:hover,
.scb-btn-primary:focus,
.scb-btn-primary:active {
  background: var(--scb-primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.scb-btn-primary:hover {
  background: var(--scb-primary-hover) !important;
}

.scb-settings { 
  border-top: 1px solid #eee; 
  padding-top: 10px; 
  margin-top: 6px; 
}

.scb-more {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #666 !important;
  margin: 0 !important;
}

.scb-more a,
.scb-more a:visited,
.scb-more a:hover,
.scb-more a:focus {
  font-size: inherit !important;
  color: inherit !important;
  text-decoration: underline !important;
  background: transparent !important;
}

.scb-actions { 
  margin-top: 10px; 
  display: flex; 
  gap: 8px; 
}

/* Mobile optimizations */
@media (max-width: 480px) { 
  #scb-banner { 
    left: 12px; 
    right: 12px; 
    max-width: unset; 
    bottom: 12px;
    padding: 20px;
  }
  
  .scb-controls {
    flex-direction: column;
  }
  
  .scb-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }
}

/* Prevent body scroll when banner is open (but not on privacy page) */
body.scb-open {
  overflow: hidden;
}

/* Loading state */
#scb-banner.loading {
  pointer-events: none;
}

#scb-banner.loading .scb-btn {
  opacity: 0.6;
  cursor: not-allowed;
}
