/* stgcookieconsent – banner, preferences, widget, placeholders. Colours come from the BO settings (CSS variables). */
.stgcc-root, .stgcc-placeholder {
  --stgcc-bg: #fff; --stgcc-text: #1f2937; --stgcc-link: #0b5cad;
  --stgcc-accept-bg: #0b5cad; --stgcc-accept-text: #fff;
  --stgcc-reject-bg: #0b5cad; --stgcc-reject-text: #fff;
  --stgcc-customize-text: #0b5cad; --stgcc-toggle-on: #1a7f37;
  --stgcc-widget-bg: #0b5cad; --stgcc-widget-icon: #fff;
  --stgcc-font-size: 14px; --stgcc-radius: 14px; --stgcc-max-width: 860px;
  --stgcc-shadow: 0 10px 40px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .12);
}
.stgcc-root, .stgcc-root *, .stgcc-placeholder, .stgcc-placeholder * { box-sizing: border-box; }
.stgcc-root { font-size: var(--stgcc-font-size); line-height: 1.5; color: var(--stgcc-text); -webkit-font-smoothing: antialiased; }
html.stgcc-noscroll, html.stgcc-noscroll body { overflow: hidden !important; }

/* ---------- banner ---------- */
.stgcc-banner-wrap { position: fixed; z-index: 2147483000; left: 0; right: 0; pointer-events: none; padding: 16px; display: flex; }
.stgcc-banner-wrap.stgcc-has-backdrop { inset: 0; pointer-events: auto; align-items: flex-end; justify-content: center; }
.stgcc-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.stgcc-banner {
  position: relative; pointer-events: auto; background: var(--stgcc-bg); color: var(--stgcc-text);
  border-radius: var(--stgcc-radius); box-shadow: var(--stgcc-shadow); width: 100%;
  max-width: var(--stgcc-max-width); padding: 22px 24px 20px;
  animation: stgcc-in .28s ease-out;
}
.stgcc-banner-wrap.stgcc-under .stgcc-banner { visibility: hidden; }
.stgcc-pos-float-bottom-center { bottom: 0; justify-content: center; }
.stgcc-pos-float-bottom-left { bottom: 0; justify-content: flex-start; }
.stgcc-pos-float-bottom-right { bottom: 0; justify-content: flex-end; }
.stgcc-pos-float-bottom-left .stgcc-banner, .stgcc-pos-float-bottom-right .stgcc-banner { max-width: min(var(--stgcc-max-width), 420px); }
.stgcc-pos-bar-bottom, .stgcc-pos-bar-top { padding: 0; }
.stgcc-pos-bar-bottom { bottom: 0; }
.stgcc-pos-bar-top { top: 0; }
.stgcc-pos-bar-bottom .stgcc-banner, .stgcc-pos-bar-top .stgcc-banner { max-width: none; border-radius: 0; padding: 18px max(24px, calc((100% - 1200px) / 2)); }
.stgcc-pos-bar-top.stgcc-has-backdrop { align-items: flex-start; }
.stgcc-pos-modal-center { inset: 0; align-items: center; justify-content: center; }

.stgcc-banner-body { display: flex; align-items: center; gap: 24px; }
.stgcc-banner-copy { flex: 1 1 auto; min-width: 0; }
.stgcc-logo { max-height: 40px; max-width: 120px; flex: 0 0 auto; align-self: flex-start; }
.stgcc-title { font-size: 1.15em; font-weight: 700; margin: 0 0 6px; color: var(--stgcc-text); line-height: 1.3; }
.stgcc-text { margin: 0; color: var(--stgcc-text); }
.stgcc-text p { margin: 0 0 .5em; }
.stgcc-root a, .stgcc-link { color: var(--stgcc-link); text-decoration: underline; text-underline-offset: 2px; }
.stgcc-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 8px; min-width: 200px; }

/* floating boxes / modal stack the buttons under the text */
.stgcc-pos-float-bottom-left .stgcc-banner-body, .stgcc-pos-float-bottom-right .stgcc-banner-body,
.stgcc-pos-modal-center .stgcc-banner-body { flex-direction: column; align-items: stretch; gap: 16px; }
.stgcc-pos-float-bottom-left .stgcc-actions, .stgcc-pos-float-bottom-right .stgcc-actions,
.stgcc-pos-modal-center .stgcc-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
.stgcc-pos-float-bottom-left .stgcc-btn, .stgcc-pos-float-bottom-right .stgcc-btn,
.stgcc-pos-modal-center .stgcc-btn { flex: 1 1 140px; }
.stgcc-pos-modal-center .stgcc-banner { max-width: min(var(--stgcc-max-width), 560px); }

/* ---------- buttons ---------- */
.stgcc-btn {
  font: inherit; font-weight: 600; font-size: 1em; line-height: 1.2; cursor: pointer; border: 2px solid transparent;
  border-radius: 999px; padding: 11px 20px; text-align: center; white-space: normal; margin: 0;
  transition: filter .15s, box-shadow .15s, background-color .15s;
}
.stgcc-btn:hover { filter: brightness(1.08); }
.stgcc-btn:focus-visible, .stgcc-x:focus-visible, .stgcc-widget:focus-visible, .stgcc-switch input:focus-visible + .stgcc-slider, .stgcc-cookies summary:focus-visible {
  outline: 3px solid var(--stgcc-link); outline-offset: 2px;
}
.stgcc-btn-accept { background: var(--stgcc-accept-bg); color: var(--stgcc-accept-text); }
.stgcc-btn-reject { background: var(--stgcc-reject-bg); color: var(--stgcc-reject-text); }
.stgcc-root:not(.stgcc-equal) .stgcc-btn-reject { background: transparent; color: var(--stgcc-text); border-color: currentColor; }
.stgcc-btn-customize { background: transparent; color: var(--stgcc-customize-text); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding-left: 8px; padding-right: 8px; }
.stgcc-x {
  position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--stgcc-text);
  font: 400 26px/1 Arial, sans-serif; cursor: pointer; border-radius: 50%; opacity: .7; padding: 0;
}
.stgcc-x:hover { opacity: 1; background: rgba(127, 127, 127, .14); }
.stgcc-banner .stgcc-x + .stgcc-banner-body .stgcc-title { padding-right: 30px; }

/* ---------- preferences ---------- */
.stgcc-prefs-wrap { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.stgcc-prefs {
  position: relative; background: var(--stgcc-bg); color: var(--stgcc-text); border-radius: var(--stgcc-radius);
  box-shadow: var(--stgcc-shadow); width: 100%; max-width: 680px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; overflow: hidden; animation: stgcc-in .22s ease-out;
}
.stgcc-prefs-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 12px; border-bottom: 1px solid rgba(127, 127, 127, .2); }
.stgcc-prefs-head .stgcc-title { margin: 0; }
.stgcc-prefs-head .stgcc-x { position: static; }
.stgcc-prefs-body { padding: 16px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.stgcc-prefs-all { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.stgcc-prefs-all .stgcc-btn { flex: 1 1 160px; padding: 9px 16px; }
.stgcc-purpose { border-top: 1px solid rgba(127, 127, 127, .2); padding: 14px 0; }
.stgcc-purpose-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stgcc-purpose-title { font-weight: 700; font-size: 1.04em; }
.stgcc-purpose-desc { margin-top: 4px; opacity: .88; }
.stgcc-purpose-desc p { margin: 0; }
.stgcc-always { font-size: .85em; font-weight: 600; color: var(--stgcc-toggle-on); white-space: nowrap; }
.stgcc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; margin: 0; cursor: pointer; }
.stgcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.stgcc-slider { position: absolute; inset: 0; background: #9aa3af; border-radius: 26px; transition: background .2s; }
.stgcc-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.stgcc-switch input:checked + .stgcc-slider { background: var(--stgcc-toggle-on); }
.stgcc-switch input:checked + .stgcc-slider::before { transform: translateX(20px); }
.stgcc-cookies { margin-top: 8px; }
.stgcc-cookies summary { cursor: pointer; color: var(--stgcc-link); font-size: .92em; font-weight: 600; }
.stgcc-table-wrap { overflow-x: auto; margin-top: 8px; }
.stgcc-cookies table { width: 100%; border-collapse: collapse; font-size: .86em; }
.stgcc-cookies th, .stgcc-cookies td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(127, 127, 127, .2); vertical-align: top; }
.stgcc-cookies th { font-weight: 700; white-space: nowrap; }
.stgcc-cookies code, .stgcc-cid code { font-size: .95em; background: rgba(127, 127, 127, .12); padding: 1px 4px; border-radius: 4px; color: inherit; word-break: break-all; }
.stgcc-prefs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 18px; border-top: 1px solid rgba(127, 127, 127, .2); flex-wrap: wrap; }
.stgcc-prefs-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88em; align-items: center; }
.stgcc-cid { opacity: .75; font-size: .92em; }
.stgcc-btn-save { min-width: 200px; }

/* ---------- widget ---------- */
.stgcc-widget {
  position: fixed; z-index: 2147482999; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--stgcc-widget-bg); color: var(--stgcc-widget-icon); box-shadow: 0 4px 14px rgba(15, 23, 42, .3);
  display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .15s;
}
.stgcc-widget:hover { transform: scale(1.08); }
.stgcc-widget-bottom-left { left: 16px; }
.stgcc-widget-bottom-right { right: 16px; }

/* ---------- placeholder for blocked iframes ---------- */
.stgcc-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: #f3f4f6; color: #1f2937; border: 1px dashed #9aa3af; border-radius: 10px; padding: 24px; min-height: 160px; width: 100%; margin: 0 auto;
  font-size: 14px; line-height: 1.45;
}
.stgcc-placeholder p { margin: 0; max-width: 460px; }
.stgcc-placeholder .stgcc-btn { padding: 9px 18px; }

/* ---------- scan bar (back office cookie scan) ---------- */
.stgcc-scanbar { position: fixed; top: 0; left: 0; right: 0; z-index: 2147483002; background: #111827; color: #fff; padding: 10px 16px; font: 600 14px/1.4 system-ui, sans-serif; text-align: center; }

/* ---------- cookie policy page ---------- */
.stgcc-policy-purpose { margin: 24px 0; }
.stgcc-policy-badge { color: #1a7f37; font-weight: 600; margin-left: 6px; }
.stgcc-policy-table code { white-space: nowrap; }

@keyframes stgcc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stgcc-banner, .stgcc-prefs { animation: none; } .stgcc-slider, .stgcc-slider::before { transition: none; } }

/* ---------- phones ---------- */
@media (max-width: 767px) {
  .stgcc-banner-wrap { padding: 0; }
  .stgcc-banner-wrap:not(.stgcc-pos-bar-top):not(.stgcc-pos-modal-center) { bottom: 0; top: auto; justify-content: center; }
  .stgcc-banner { border-radius: var(--stgcc-radius) var(--stgcc-radius) 0 0; padding: 18px 16px 16px; max-height: 85vh; overflow-y: auto; }
  .stgcc-pos-bar-top .stgcc-banner { border-radius: 0 0 var(--stgcc-radius) var(--stgcc-radius); }
  .stgcc-pos-modal-center { padding: 12px; }
  .stgcc-pos-modal-center .stgcc-banner { border-radius: var(--stgcc-radius); }
  .stgcc-pos-float-bottom-left .stgcc-banner, .stgcc-pos-float-bottom-right .stgcc-banner { max-width: none; }
  .stgcc-banner-body { flex-direction: column; align-items: stretch; gap: 14px; }
  .stgcc-actions { flex-direction: column; min-width: 0; }
  .stgcc-actions .stgcc-btn { width: 100%; flex: none; }
  .stgcc-actions .stgcc-btn-customize { order: 3; }
  .stgcc-prefs-wrap { padding: 0; align-items: flex-end; }
  .stgcc-prefs { max-width: none; border-radius: var(--stgcc-radius) var(--stgcc-radius) 0 0; max-height: 92vh; max-height: 92dvh; }
  .stgcc-prefs-head, .stgcc-prefs-body, .stgcc-prefs-foot { padding-left: 16px; padding-right: 16px; }
  .stgcc-btn-save { width: 100%; }
  .stgcc-cookies thead { display: none; }
  .stgcc-cookies tr { display: block; padding: 6px 0; border-bottom: 1px solid rgba(127, 127, 127, .2); }
  .stgcc-cookies td { display: block; border: 0; padding: 1px 0; }
  .stgcc-widget { width: 40px; height: 40px; bottom: 12px; }
  .stgcc-widget-bottom-left { left: 12px; }
  .stgcc-widget-bottom-right { right: 12px; }
}
@media print { .stgcc-root { display: none !important; } }
