/* Easy4Pro cookie consent banner + preferences modal
   Loaded on every page. Self-contained: does not assume any other
   page-specific CSS variables exist. */

#e4p-cc-banner, #e4p-cc-modal-overlay {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box;
}
#e4p-cc-banner *, #e4p-cc-modal-overlay * { box-sizing: border-box; }

/* ─── BANNER (first layer) ─── */
#e4p-cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: #ffffff;
  border-top: 1px solid #dce8f5;
  box-shadow: 0 -8px 32px rgba(15,44,100,0.14);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  animation: e4p-cc-slide-up .35s ease;
}
@keyframes e4p-cc-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
#e4p-cc-banner[hidden] { display: none; }

.e4p-cc-text {
  flex: 1 1 380px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.6;
  color: #1D1D1B;
  margin: 0;
}
.e4p-cc-text a {
  color: #29519D;
  font-weight: 600;
  text-decoration: underline;
}
.e4p-cc-text a:hover { color: #EC6825; }

.e4p-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* Buttons — Accept / Reject same size & weight, Customize visually distinct
   but equally reachable (never a bare text link) */
.e4p-cc-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .2s, border-color .2s;
  line-height: 1.2;
  min-height: 40px;
}
.e4p-cc-btn:focus-visible {
  outline: 2.5px solid #29519D;
  outline-offset: 2px;
}
.e4p-cc-btn-accept {
  background: #EC6825;
  border: 1.5px solid #EC6825;
  color: #ffffff;
}
.e4p-cc-btn-accept:hover { background: #CD5600; border-color: #CD5600; transform: translateY(-1px); }
.e4p-cc-btn-reject {
  background: #0F2C64;
  border: 1.5px solid #0F2C64;
  color: #ffffff;
}
.e4p-cc-btn-reject:hover { background: #0a1f47; border-color: #0a1f47; transform: translateY(-1px); }
.e4p-cc-btn-customize {
  background: none;
  border: 1.5px solid rgba(41,81,157,0.35);
  color: #29519D;
}
.e4p-cc-btn-customize:hover { background: rgba(41,81,157,0.06); transform: translateY(-1px); }

/* ─── MODAL (second layer) ─── */
#e4p-cc-modal-overlay {
  position: fixed; inset: 0;
  z-index: 100000;
  background: rgba(15,44,100,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#e4p-cc-modal-overlay[hidden] { display: none; }

#e4p-cc-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(15,44,100,0.28);
}
.e4p-cc-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F2C64;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.e4p-cc-modal-intro {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.65;
  color: #4D4D4D;
  margin: 0 0 24px;
}

.e4p-cc-category {
  border-top: 1px solid #dce8f5;
  padding: 18px 0;
}
.e4p-cc-category:last-of-type { border-bottom: 1px solid #dce8f5; }
.e4p-cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.e4p-cc-category-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0F2C64;
}
.e4p-cc-category-desc {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.6;
  color: #4D4D4D;
  margin: 0;
}
.e4p-cc-badge-always-on {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4D4D4D;
  background: #f0f4fb;
  border: 1px solid #dce8f5;
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* Toggle switch */
.e4p-cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.e4p-cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.e4p-cc-switch-track {
  position: absolute; inset: 0;
  background: #c9d3e0;
  border-radius: 999px;
  transition: background .2s;
  pointer-events: none;
}
.e4p-cc-switch-track::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.e4p-cc-switch input:checked + .e4p-cc-switch-track { background: #29519D; }
.e4p-cc-switch input:checked + .e4p-cc-switch-track::before { transform: translateX(18px); }
.e4p-cc-switch input:disabled + .e4p-cc-switch-track { background: #a9c5a9; opacity: .7; cursor: not-allowed; }
.e4p-cc-switch input:focus-visible + .e4p-cc-switch-track {
  outline: 2.5px solid #29519D;
  outline-offset: 2px;
}

.e4p-cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.e4p-cc-modal-actions .e4p-cc-btn { flex: 1 1 auto; }

.e4p-cc-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: none;
  color: #4D4D4D;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.e4p-cc-modal-close:hover { background: #f0f4fb; color: #0F2C64; }

/* Persistent footer control fallback (pages with no .footer-links, e.g. landing pages) */
.e4p-cc-footer-fallback {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 9998;
  background: rgba(15,44,100,0.9);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.e4p-cc-footer-fallback:hover { background: #0F2C64; }

@media (max-width: 640px) {
  #e4p-cc-banner { padding: 16px; }
  .e4p-cc-text { flex-basis: 100%; }
  .e4p-cc-actions { flex-basis: 100%; }
  .e4p-cc-btn { flex: 1 1 auto; text-align: center; }
  #e4p-cc-modal { padding: 24px 20px; border-radius: 14px; }
}
