/*
  Bee Insightful full-width consent bar — overrides for Silktide Consent Manager v2.0.1.
  Brand tokens from v3-theme (sage #3D5A4A, ink #1E2D22, DM Sans).
  Official Silktide files are unchanged; MIT license in LICENSE in this folder.
*/
#stcm-wrapper {
  --fontFamily: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --primaryColor: #3D5A4A;
  --backgroundColor: #FFFFFF;
  --textColor: #1E2D22;
  --iconColor: #FFFFFF;
  --iconBackgroundColor: #3D5A4A;
  --backdropBackgroundColor: #111E2877;
  --boxShadow: 0 -8px 24px rgba(17, 30, 40, 0.12);
}

#stcm-backdrop { z-index: 1; }
#stcm-banner, #stcm-modal, #stcm-icon { z-index: 2; }

/* Full-bleed bottom bar (Silktide has no native full-width position). */
#stcm-banner,
#stcm-banner.stcm-pos-bottom-center,
#stcm-banner.stcm-pos-bottom-center.stcm-loaded {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  animation: none !important;
  opacity: 1 !important;
  border-radius: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 32px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(17, 30, 40, 0.12);
  overflow: visible;
}

#stcm-banner > p {
  flex: 1 1 auto;
  margin: 0 !important;
  font-size: 15px;
  line-height: 22px;
  max-width: none;
}

#stcm-banner .stcm-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 0 !important;
  gap: 10px;
  flex-wrap: nowrap;
}

#stcm-banner .stcm-actions-row {
  flex-grow: 0;
  justify-content: flex-start;
  gap: 8px;
}

#stcm-wrapper .stcm-button {
  white-space: nowrap;
  min-height: 44px;
  box-sizing: border-box;
  font-weight: 600;
}

/* First-layer bar: Accept all + Manage only. Decline stays in Cookie settings. */
#stcm-banner .stcm-reject-all {
  display: none !important;
}

/* Optional Silktide credit is omitted. */
#stcm-banner .stcm-logo,
#stcm-modal .stcm-credit-link {
  display: none !important;
}

/* Manage as a secondary outline button. */
#stcm-banner .stcm-preferences-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 5px;
  border: 2px solid var(--primaryColor);
  background-color: var(--backgroundColor);
  color: var(--primaryColor);
  font-family: var(--fontFamily);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
}
#stcm-banner .stcm-preferences-button span {
  text-decoration: none;
  color: inherit;
}
#stcm-banner .stcm-preferences-button:hover {
  background-color: var(--primaryColor);
  color: var(--backgroundColor);
}
#stcm-banner .stcm-preferences-button span:hover {
  color: inherit;
}

#stcm-modal {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 719px) {
  #stcm-banner,
  #stcm-banner.stcm-pos-bottom-center,
  #stcm-banner.stcm-pos-bottom-center.stcm-loaded {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  #stcm-banner > p {
    font-size: 14px;
    line-height: 20px;
  }
  #stcm-banner .stcm-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  #stcm-wrapper .stcm-button {
    width: 100%;
  }
  #stcm-banner .stcm-actions-row {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  #stcm-banner .stcm-preferences-button {
    flex: 1 1 auto;
    width: 100%;
  }
  #stcm-modal {
    padding: 18px 16px 16px;
  }
  #stcm-modal header { margin-bottom: 12px; }
  #stcm-modal section { margin-top: 14px; }
  #stcm-modal fieldset { margin-bottom: 14px; }
}


/* 0.7.22: the theme's global `header { position: fixed; top: 0; ... }` (base-1.0.0.css)
   was pinning the Cookie settings title and close button to the top-left of the screen.
   Put the modal header back inside the panel as a flex row (title left, close X right).
   The h1 must use DM Sans; the theme forces Fraunces on headings with !important. */
#stcm-modal header {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  z-index: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#stcm-modal header h1,
#stcm-modal h1 {
  font-family: var(--fontFamily, "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif) !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  letter-spacing: normal;
  color: var(--textColor, #1E2D22);
  margin: 0 !important;
}
