/* Silktide overrides — load after silktide-consent-manager.css (black & white) */

#stcm-wrapper {
  --primaryColor: #000000;
  --backgroundColor: #ffffff;
  --textColor: #000000;
  --iconColor: #000000;
  --iconBackgroundColor: #ffffff;
  --backdropBackgroundColor: rgba(0, 0, 0, 0.5);
  --backdropBackgroundBlur: 0px;
  --boxShadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

#stcm-wrapper #stcm-banner,
#stcm-wrapper #stcm-modal {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
  box-shadow: var(--boxShadow) !important;
}

#stcm-wrapper #stcm-banner {
  padding: 20px 24px !important;
  max-width: 720px !important;
}

@media (min-width: 600px) {
  #stcm-wrapper #stcm-modal {
    max-width: 880px !important;
  }
}

#stcm-wrapper #stcm-banner p {
  margin: 0 0 12px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #000000 !important;
}

#stcm-wrapper #stcm-banner .stcm-actions {
  margin-top: 12px !important;
  gap: 10px !important;
}

#stcm-wrapper #stcm-banner .stcm-button {
  padding: 10px 18px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

#stcm-wrapper #stcm-banner .stcm-preferences-button {
  padding: 8px 0 !important;
  font-size: 13px !important;
  font-family: "Spartan-SemiBold", sans-serif !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

#stcm-wrapper #stcm-modal p,
#stcm-wrapper #stcm-modal legend,
#stcm-wrapper #stcm-modal h1 {
  color: #000000 !important;
}

#stcm-wrapper a,
#stcm-wrapper #stcm-banner a,
#stcm-wrapper #stcm-modal a,
#stcm-wrapper #stcm-banner .stcm-preferences-button {
  color: #000000 !important;
  background-color: transparent !important;
}

#stcm-wrapper a:hover,
#stcm-wrapper #stcm-banner .stcm-preferences-button:hover,
#stcm-wrapper #stcm-banner .stcm-preferences-button span:hover {
  color: #000000 !important;
  opacity: 0.7;
}

#stcm-wrapper .stcm-button,
#stcm-wrapper .stcm-button-primary,
#stcm-wrapper .stcm-button-secondary {
  border-radius: 0 !important;
  font-family: "Spartan-SemiBold", sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
  transition: opacity 0.2s ease !important;
}

#stcm-wrapper .stcm-button,
#stcm-wrapper .stcm-button-primary {
  color: #ffffff !important;
  background-color: #000000 !important;
  border: 1px solid #000000 !important;
}

#stcm-wrapper .stcm-button:hover,
#stcm-wrapper .stcm-button-primary:hover {
  color: #ffffff !important;
  background-color: #000000 !important;
  border: 1px solid #000000 !important;
  opacity: 0.75;
}

#stcm-wrapper .stcm-button-secondary {
  color: #000000 !important;
  background-color: transparent !important;
  border: 1px solid #000000 !important;
}

#stcm-wrapper .stcm-button-secondary:hover {
  color: #000000 !important;
  background-color: transparent !important;
  border: 1px solid #000000 !important;
  opacity: 0.75;
}

/* Hide Silktide floating icon — footer button opens preferences instead */

#stcm-wrapper #stcm-icon {
  display: none !important;
}

/* Hide Silktide branding link */

#stcm-modal footer a.stcm-credit-link,
#stcm-modal footer a[href*="silktide"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#stcm-wrapper #stcm-modal .stcm-modal-close {
  background: #ffffff !important;
  color: #000000 !important;
}

#stcm-wrapper #stcm-modal .stcm-modal-close svg {
  fill: #000000 !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle-track {
  background: #cccccc !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle-thumb {
  background: #ffffff !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle-off,
#stcm-wrapper #stcm-modal .stcm-toggle-on {
  color: #000000 !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle input:checked + .stcm-toggle-track {
  background: #000000 !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-thumb {
  background: #ffffff !important;
}

#stcm-wrapper #stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-on {
  color: #ffffff !important;
}

#stcm-wrapper #stcm-modal section::-webkit-scrollbar-thumb {
  background-color: #000000 !important;
}

#stcm-wrapper #stcm-banner a.stcm-logo svg,
#stcm-wrapper #stcm-banner a.stcm-logo {
  fill: #000000 !important;
}

#stcm-wrapper #stcm-banner a.stcm-logo {
  display: none !important;
}

/* Mobile: keep banner/modal within viewport */
@media (max-width: 599px) {
  #stcm-wrapper #stcm-banner {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: calc(
      100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    ) !important;
    left: 50% !important;
    right: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    padding: 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
  }

  #stcm-wrapper #stcm-banner.stcm-pos-bottom-center {
    transform: translate(-50%, 0) !important;
  }

  #stcm-wrapper #stcm-banner.stcm-loaded.stcm-pos-bottom-center {
    transform: translate(-50%, 0) !important;
  }

  #stcm-wrapper #stcm-banner p {
    font-size: 13px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #stcm-wrapper #stcm-banner .stcm-actions {
    margin-top: 10px !important;
    gap: 8px !important;
  }

  #stcm-wrapper #stcm-banner .stcm-actions-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #stcm-wrapper #stcm-banner .stcm-button {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    text-align: center !important;
  }

  #stcm-wrapper #stcm-banner .stcm-preferences-button {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    font-size: 12px !important;
  }

  #stcm-wrapper #stcm-banner .stcm-preferences-button span {
    white-space: normal !important;
    text-align: center !important;
  }

  #stcm-wrapper #stcm-modal {
    width: 90vw !important;
    max-width: 90vw !important;
    max-height: calc(
      100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    ) !important;
    margin: 8px !important;
    padding: 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
  }

  #stcm-wrapper #stcm-modal header {
    margin-bottom: 12px !important;
    gap: 8px !important;
  }

  #stcm-wrapper #stcm-modal h1 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  #stcm-wrapper #stcm-modal section {
    margin-top: 16px !important;
  }

  #stcm-wrapper #stcm-modal .stcm-consent-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #stcm-wrapper #stcm-modal .stcm-toggle {
    align-self: flex-end;
  }

  #stcm-wrapper #stcm-modal footer {
    margin-top: 16px !important;
  }

  #stcm-wrapper #stcm-modal footer .stcm-button {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
}
