/* ===== Cookie Consent (inline-expanding banner) ===== */
.cc-banner {
  --cc-bg: #ffffff;
  --cc-text: #222222;
  --cc-sub: #555555;
  --cc-accent: #1a2b4c;      /* button color - adjust to site color */
  --cc-accent-text: #ffffff;
  --cc-border: #dddddd;

  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10000;
  max-width: 720px; margin: 0 auto;
  max-height: 85vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-sizing: border-box; padding: 20px 24px;
  background: var(--cc-bg); color: var(--cc-text);
  border: 1px solid var(--cc-border); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  font-size: 14px; line-height: 1.6; text-align: left;
}
.cc-banner *, .cc-banner *::before, .cc-banner *::after { box-sizing: border-box; }
.cc-banner[hidden], .cc-banner [hidden] { display: none !important; }
.cc-banner p { margin: 0; }
.cc-banner a { color: var(--cc-accent); text-decoration: underline; }

.cc-title { font-weight: 700; font-size: 16px; margin-bottom: 6px !important; padding-right: 28px; }
.cc-text { color: var(--cc-sub); }

/* Close (only when opened from "Cookie Settings") */
.cc-close {
  position: absolute; top: 8px; right: 12px; border: 0; background: none; padding: 0;
  font-size: 28px; line-height: 1; cursor: pointer; color: var(--cc-sub);
}

/* Preferences (expanded) */
.cc-prefs { margin-top: 16px; border-top: 1px solid var(--cc-border); }
.cc-cat { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--cc-border); }
.cc-cat__name { font-weight: 700; }
.cc-cat__desc { color: var(--cc-sub); font-size: 13px; margin-top: 2px !important; }
.cc-always { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #2e7d32; margin-top: 2px; }

/* Buttons (Accept / Reject have equal prominence for GDPR) */
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; }
.cc-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-weight: 700;
  padding: 10px 18px; min-width: 130px; border-radius: 4px;
  border: 2px solid var(--cc-accent); background: var(--cc-accent); color: var(--cc-accent-text);
}
.cc-btn--ghost { background: transparent; color: var(--cc-accent); }
.cc-btn--link { min-width: 0; margin-right: auto; padding-left: 0; border-color: transparent; background: transparent; color: var(--cc-accent); text-decoration: underline; }
.cc-btn:hover, .cc-close:hover { opacity: .85; }
.cc-btn:focus-visible, .cc-close:focus-visible { outline: 3px solid #4d90fe; outline-offset: 2px; }

/* Toggle switch */
.cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cc-switch__slider { position: absolute; inset: 0; background: #bbb; border-radius: 24px; transition: background .2s; }
.cc-switch__slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.cc-switch input:checked + .cc-switch__slider { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch__slider { outline: 3px solid #4d90fe; outline-offset: 2px; }

/* Footer link */
.cookie-settings-link { display: inline-block; margin-top: 6px; color: inherit; text-decoration: underline; cursor: pointer; font-size: 13px; }

/* Mobile */
@media (max-width: 600px) {
  .cc-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; font-size: 13px; }
  .cc-actions { flex-direction: column-reverse; align-items: stretch; }
  .cc-btn { width: 100%; }
  .cc-btn--link { margin-right: 0; padding-left: 18px; }
}
