/* ==========================================================================
   Ebookerr Cookie Consent — styled to match the Ebookerr brand
   ========================================================================== */
:root {
  --eb-gdpr-primary:   #7C3AED;
  --eb-gdpr-secondary: #EC4899;
  --eb-gdpr-grad:       linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --eb-gdpr-dark:       #0F0A1E;
  --eb-gdpr-dark2:      #1A1040;
  --eb-gdpr-text:       #1F2937;
  --eb-gdpr-muted:      #6B7280;
  --eb-gdpr-border:     #E5E7EB;
  --eb-gdpr-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* The [hidden] attribute must always win over any display rule below —
   without this, elements that also set "display" (modal, reopen button)
   stay visible/clickable even while hidden, silently swallowing clicks
   meant for the buttons underneath. */
#eb-gdpr-banner[hidden],
#eb-gdpr-modal[hidden],
#eb-gdpr-overlay[hidden],
#eb-gdpr-reopen[hidden] { display: none !important; }

#eb-gdpr-overlay {
  position: fixed; inset: 0; z-index: 999997;
  background: rgba(15,10,30,.55); backdrop-filter: blur(3px);
}

/* ---- BANNER ---- */
.eb-gdpr-banner {
  position: fixed; z-index: 999998;
  font-family: var(--eb-gdpr-font);
  animation: eb-gdpr-rise .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes eb-gdpr-rise { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.eb-gdpr-pos-bar {
  left: 0; right: 0; bottom: 0;
  background: var(--eb-gdpr-dark);
  border-top: 1px solid rgba(124,58,237,.4);
  box-shadow: 0 -10px 40px rgba(0,0,0,.35);
}
.eb-gdpr-pos-bar .eb-gdpr-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: 22px 28px;
  display: flex; align-items: center; gap: 24px;
}

.eb-gdpr-pos-left,
.eb-gdpr-pos-right {
  bottom: 24px; max-width: 400px;
  background: var(--eb-gdpr-dark);
  border-radius: 18px;
  border: 1px solid rgba(124,58,237,.4);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.eb-gdpr-pos-left  { left: 24px; }
.eb-gdpr-pos-right { right: 24px; }
.eb-gdpr-pos-left .eb-gdpr-banner-inner,
.eb-gdpr-pos-right .eb-gdpr-banner-inner {
  padding: 26px; display: flex; flex-direction: column; gap: 16px;
}

.eb-gdpr-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.eb-gdpr-pos-bar .eb-gdpr-icon { align-self: flex-start; margin-top: 2px; }

.eb-gdpr-copy { flex: 1; min-width: 0; }
.eb-gdpr-copy h3 {
  font-size: 16px; font-weight: 800; color: #fff; margin: 0 0 6px;
  font-family: var(--eb-gdpr-font);
}
.eb-gdpr-copy p {
  font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,.65); margin: 0;
}
.eb-gdpr-copy a { color: #C4B5FD; font-weight: 600; text-decoration: underline; }
.eb-gdpr-copy a:hover { color: #fff; }

.eb-gdpr-actions {
  display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap;
}
.eb-gdpr-pos-left .eb-gdpr-actions,
.eb-gdpr-pos-right .eb-gdpr-actions { flex-direction: column; }

.eb-gdpr-btn {
  font-family: var(--eb-gdpr-font);
  border: none; border-radius: 9px; padding: 11px 18px;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.eb-gdpr-btn:hover { transform: translateY(-1px); }
.eb-gdpr-btn-primary {
  background: var(--eb-gdpr-grad); color: #fff;
  box-shadow: 0 4px 18px rgba(124,58,237,.45);
}
.eb-gdpr-btn-primary:hover { box-shadow: 0 8px 26px rgba(124,58,237,.6); }
.eb-gdpr-btn-outline {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
}
.eb-gdpr-btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.eb-gdpr-btn-ghost {
  background: transparent; color: rgba(255,255,255,.55);
}
.eb-gdpr-btn-ghost:hover { color: #fff; }

/* ---- MODAL (customize panel) ---- */
.eb-gdpr-modal {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.eb-gdpr-modal-inner {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
  font-family: var(--eb-gdpr-font);
  animation: eb-gdpr-pop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes eb-gdpr-pop { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.eb-gdpr-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; background: var(--eb-gdpr-grad); border-radius: 20px 20px 0 0;
}
.eb-gdpr-modal-title { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; }
.eb-gdpr-modal-close {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.eb-gdpr-modal-close:hover { background: rgba(255,255,255,.32); }

.eb-gdpr-modal-body { padding: 22px 26px; }
.eb-gdpr-modal-intro { font-size: 13.5px; color: var(--eb-gdpr-muted); line-height: 1.6; margin: 0 0 20px; }

.eb-gdpr-cat {
  border: 1.5px solid var(--eb-gdpr-border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.eb-gdpr-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.eb-gdpr-cat-title { font-weight: 700; font-size: 14.5px; color: var(--eb-gdpr-text); }
.eb-gdpr-cat-desc { font-size: 12.5px; color: var(--eb-gdpr-muted); line-height: 1.55; margin: 0; }

.eb-gdpr-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.eb-gdpr-switch input { opacity: 0; width: 0; height: 0; }
.eb-gdpr-slider {
  position: absolute; cursor: pointer; inset: 0; border-radius: 24px;
  background: #D1D5DB; transition: background .2s ease;
}
.eb-gdpr-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.eb-gdpr-switch input:checked + .eb-gdpr-slider { background: var(--eb-gdpr-grad); }
.eb-gdpr-switch input:checked + .eb-gdpr-slider::before { transform: translateX(18px); }
.eb-gdpr-switch-locked .eb-gdpr-slider { background: var(--eb-gdpr-grad); cursor: default; opacity: .85; }
.eb-gdpr-switch-locked .eb-gdpr-slider::before { transform: translateX(18px); }

.eb-gdpr-modal-foot {
  display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 26px 24px; border-top: 1px solid var(--eb-gdpr-border);
}
.eb-gdpr-modal-foot .eb-gdpr-btn { flex: 1; justify-content: center; }
.eb-gdpr-modal-foot .eb-gdpr-btn-ghost,
.eb-gdpr-modal-foot .eb-gdpr-btn-outline { color: var(--eb-gdpr-text); border-color: var(--eb-gdpr-border); }
.eb-gdpr-modal-foot .eb-gdpr-btn-ghost:hover,
.eb-gdpr-modal-foot .eb-gdpr-btn-outline:hover { border-color: var(--eb-gdpr-primary); color: var(--eb-gdpr-primary); }

/* ---- REOPEN ICON ---- */
.eb-gdpr-reopen {
  position: fixed; bottom: 20px; left: 20px; z-index: 999996;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--eb-gdpr-grad); color: #fff; font-size: 22px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(124,58,237,.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.eb-gdpr-reopen:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(124,58,237,.6); }

@media (max-width: 760px) {
  .eb-gdpr-pos-bar .eb-gdpr-banner-inner { flex-direction: column; align-items: flex-start; }
  .eb-gdpr-actions { width: 100%; }
  .eb-gdpr-actions .eb-gdpr-btn { flex: 1; }
  .eb-gdpr-pos-left, .eb-gdpr-pos-right { left: 12px; right: 12px; max-width: none; }
}
