/* GON Consent Manager: banner layout.
   Colours, fonts, radius and width come from the settings page
   and are printed inline after this file. */

/* ============ Root ============ */
.gcm-root {
  position: fixed;
  z-index: 999999;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  padding: 16px;
  box-sizing: border-box;
  pointer-events: none;
}
.gcm-root[hidden] {
  display: none;
}
.gcm-root *,
.gcm-root *::before,
.gcm-root *::after {
  box-sizing: border-box;
}
.gcm-root.gcm-pos-bottom-right {
  justify-content: flex-end;
}
.gcm-root.gcm-pos-bottom-left {
  justify-content: flex-start;
}
.gcm-root.gcm-pos-bottom-center {
  justify-content: center;
}
.gcm-root.gcm-pos-center {
  top: 0;
  align-items: center;
  justify-content: center;
  background: rgba(51, 51, 47, 0.35);
  pointer-events: auto;
}

/* ============ Card ============ */
.gcm-root .gcm-card {
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 22px 18px;
  border-width: 2px;
  border-style: solid;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  pointer-events: auto;
  animation: gcm-rise 0.28s ease-out both;
}
.gcm-root .gcm-card:focus {
  outline: none;
}
@keyframes gcm-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ Layers ============ */
.gcm-root .gcm-layer {
  display: none;
}
.gcm-root[data-gcm-layer="banner"] .gcm-layer-banner,
.gcm-root[data-gcm-layer="prefs"] .gcm-layer-prefs,
.gcm-root[data-gcm-layer="us"] .gcm-layer-us {
  display: block;
}

/* ============ Title and message ============ */
.gcm-root .gcm-title {
  margin: 0 0 6px;
  padding: 0;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.gcm-root .gcm-title:focus {
  outline: none;
}
.gcm-root .gcm-message {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
}
.gcm-root .gcm-message a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Buttons ============ */
.gcm-root .gcm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gcm-root .gcm-btn {
  flex: 1 1 calc(50% - 4px);
  display: block;
  width: auto;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease;
}
.gcm-root .gcm-btn-save,
.gcm-root .gcm-btn-full {
  flex: 1 1 100%;
  width: 100%;
}

/* ============ Opt-out (CCPA) row ============ */
.gcm-root .gcm-optout-row {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.gcm-root .gcm-link.gcm-link-strong {
  font-weight: 600;
}
.gcm-root .gcm-btn:focus-visible,
.gcm-root .gcm-link:focus-visible,
.gcm-root .gcm-switch:focus-visible,
.gcm-root .gcm-docs a:focus-visible,
.gcm-tab:focus-visible {
  outline-width: 2px;
  outline-style: solid;
  outline-offset: 2px;
}

/* ============ Bottom row ============ */
.gcm-root .gcm-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.gcm-root .gcm-link {
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.gcm-root .gcm-link:hover {
  background: transparent;
}
.gcm-root .gcm-docs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.gcm-root .gcm-docs a {
  overflow-wrap: anywhere;
  padding: 4px 0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Categories ============ */
.gcm-root .gcm-cats {
  margin: 10px 0 14px;
  padding: 0;
  list-style: none;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
.gcm-root .gcm-cat {
  margin: 0;
  padding: 12px 0;
  list-style: none;
  border-top-width: 1px;
  border-top-style: solid;
}
.gcm-root .gcm-cat[hidden] {
  display: none;
}
.gcm-root .gcm-cat::before,
.gcm-root .gcm-cat::marker {
  content: none;
}
.gcm-root .gcm-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 24px;
}
.gcm-root .gcm-cat-title {
  font-size: 14px;
  line-height: 1.4;
}
.gcm-root .gcm-always {
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.gcm-root .gcm-cat-desc {
  margin: 4px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* ============ Toggle ============ */
.gcm-root .gcm-switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease;
}
.gcm-root .gcm-switch::after {
  content: "";
  position: absolute;
  top: -11px;
  right: -4px;
  bottom: -11px;
  left: -4px;
}
.gcm-root .gcm-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s ease;
}
.gcm-root .gcm-switch[aria-checked="true"] .gcm-knob {
  transform: translateX(18px);
}

/* ============ Reopen tab ============ */
.gcm-tab {
  position: fixed;
  z-index: 999998;
  bottom: 0;
  margin: 0;
  padding: 8px 14px;
  border-width: 1px 1px 0;
  border-style: solid;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.gcm-tab[hidden] {
  display: none;
}
.gcm-tab.gcm-tab-bottom-right,
.gcm-tab.gcm-tab-bottom-center,
.gcm-tab.gcm-tab-center {
  right: 24px;
}
.gcm-tab.gcm-tab-bottom-left {
  left: 24px;
}

/* ============ Blocked embeds ============ */
.gcm-embed {
  position: relative;
}
.gcm-embed iframe[data-gcm-src] {
  display: none;
}
.gcm-embed-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
  border-width: 1px;
  border-style: solid;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.gcm-embed-notice p {
  max-width: 420px;
  margin: 0;
}
.gcm-embed-notice .gcm-embed-btn {
  min-height: 40px;
  margin: 0;
  padding: 8px 18px;
  border: 0;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.gcm-embed.gcm-embed-on .gcm-embed-notice {
  display: none;
}

/* ============ Dashboard preview ============ */
.gcm-root.gcm-is-preview {
  position: static;
  z-index: auto;
  padding: 0;
  background: transparent;
  justify-content: flex-start;
}
.gcm-root.gcm-is-preview .gcm-card {
  max-height: none;
  animation: none;
}

/* ============ Mobile ============ */
/* Phones: 12px from the edges (plus the iPhone home bar), Accept and Decline
   side by side, and the first notice capped at a third of the screen. The
   message scrolls inside the card if needed, so the buttons and links always
   stay in view. The preferences layer may grow, as the visitor asked for it. */
@media (max-width: 600px) {
  .gcm-root:not(.gcm-is-preview) {
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  }
  .gcm-root:not(.gcm-is-preview) .gcm-card {
    max-width: none;
    max-height: calc(100vh - 24px);
    padding: 16px 16px 12px;
  }
  .gcm-root:not(.gcm-is-preview)[data-gcm-layer="banner"] .gcm-card,
  .gcm-root:not(.gcm-is-preview)[data-gcm-layer="us"] .gcm-card {
    display: flex;
    flex-direction: column;
    max-height: 33vh;
    max-height: 33svh;
  }
  .gcm-root:not(.gcm-is-preview)[data-gcm-layer="banner"] .gcm-layer-banner,
  .gcm-root:not(.gcm-is-preview)[data-gcm-layer="us"] .gcm-layer-us {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  .gcm-root:not(.gcm-is-preview) .gcm-title {
    flex: none;
    margin-bottom: 4px;
    font-size: 18px;
  }
  .gcm-root:not(.gcm-is-preview) .gcm-message {
    flex: 0 1 auto;
    min-height: 3em;
    margin-bottom: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 13px;
    line-height: 1.5;
  }
  .gcm-root:not(.gcm-is-preview) .gcm-actions,
  .gcm-root:not(.gcm-is-preview) .gcm-optout-row,
  .gcm-root:not(.gcm-is-preview) .gcm-meta {
    flex: none;
  }
  .gcm-root:not(.gcm-is-preview) .gcm-optout-row {
    margin-top: 8px;
  }
  .gcm-root:not(.gcm-is-preview) .gcm-meta {
    margin-top: 6px;
  }
  .gcm-root .gcm-btn {
    flex: 1 1 calc(50% - 4px);
    padding: 8px 10px;
  }
  .gcm-tab.gcm-tab-bottom-right,
  .gcm-tab.gcm-tab-bottom-center,
  .gcm-tab.gcm-tab-center {
    right: 12px;
  }
  .gcm-tab.gcm-tab-bottom-left {
    left: 12px;
  }
}
