/* GDPR / cookie consent: banner, preferences window, policy tables, request form. */
.bpc[hidden], .bpc-overlay[hidden] { display: none !important; }

/* Banner ------------------------------------------------------------------ */
.bpc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2500;
  max-width: 980px; margin: 0 auto; padding: 18px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .22);
  font-family: inherit; font-size: .9rem; line-height: 1.5;
}
.bpc__text { flex: 1 1 360px; min-width: 0; }
.bpc__title { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: #0f172a; }
.bpc__text p { margin: 0; color: #475569; }
.bpc a, .bpc-modal a { color: #123f9e; text-decoration: underline; }
.bpc__actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; }

/* Buttons: Refuse and Accept share the same look (equal prominence). ------- */
.bpc-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: .875rem;
  min-height: 42px; padding: 0 18px; border-radius: 10px; border: 2px solid #123f9e; line-height: 1;
  transition: background-color .15s, color .15s;
}
.bpc-btn--solid { background: #123f9e; color: #fff; }
.bpc-btn--solid:hover { background: #0b2c78; border-color: #0b2c78; }
.bpc-btn--ghost { background: #fff; color: #123f9e; }
.bpc-btn--ghost:hover { background: #eef3ff; }
.bpc-btn--inline { margin-top: 8px; }
.bpc-btn:focus-visible, .bpc-close:focus-visible, .bpc-switch:focus-visible { outline: 3px solid #ffb000; outline-offset: 2px; }

/* Preferences window ------------------------------------------------------ */
.bpc-overlay {
  position: fixed; inset: 0; z-index: 3500; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15, 23, 42, .55);
}
.bpc-modal {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 26px 24px 22px; background: #fff; color: #0f172a; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .35); font-size: .92rem; line-height: 1.5; outline: none;
}
.bpc-modal__title { margin: 0 32px 6px 0; font-size: 1.2rem; font-weight: 800; }
.bpc-modal__intro { margin: 0 0 14px; color: #475569; }
.bpc-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: #475569; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.bpc-close:hover { background: #f1f5f9; }
.bpc-cat { padding: 12px 0; border-top: 1px solid #e2e8f0; }
.bpc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bpc-cat__head label { font-weight: 700; }
.bpc-cat p { margin: 4px 0 0; color: #64748b; font-size: .85rem; }
.bpc-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid #e2e8f0; }

/* Toggle switch ----------------------------------------------------------- */
.bpc-switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background-color .15s;
}
.bpc-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .15s;
}
.bpc-switch:checked { background: #123f9e; }
.bpc-switch:checked::after { transform: translateX(18px); }
.bpc-switch:disabled { opacity: .6; cursor: not-allowed; }

/* Policy pages: cookie table + rights request form ----------------------- */
.bpc-table-wrap { overflow-x: auto; margin: 0 0 20px; }
.bpc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bpc-table th, .bpc-table td { padding: 10px 12px; border: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.bpc-table th { background: #f8fafc; font-weight: 700; }
.bpc-table code { font-size: .82rem; word-break: break-word; }

.bpc-request { max-width: 560px; margin: 12px 0 24px; padding: 20px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.bpc-request fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.bpc-request legend { margin-bottom: 6px; font-weight: 700; }
.bpc-request fieldset label { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-weight: 400; }
.bpc-request__field { display: block; margin-bottom: 4px; font-weight: 700; }
.bpc-request input[type="email"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; }
.bpc-request__msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.bpc-request__msg--ok { background: #e8f7ee; color: #14532d; }
.bpc-request__msg--err { background: #fdecec; color: #7f1d1d; }
.bpc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
  .bpc { left: 8px; right: 8px; bottom: 8px; padding: 14px; }
  .bpc__actions, .bpc-modal__actions { flex-direction: column; }
  .bpc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bpc-btn, .bpc-switch, .bpc-switch::after { transition: none; }
}
