/* Cookie consent (Silktide Consent Manager) in Club Kalmthout colors */
#stcm-wrapper {
  --fontFamily: var(--font-family-sans-serif);
  --primaryColor: var(--color-primary);
  --backgroundColor: var(--color-light);
  --textColor: var(--color-primary);
  --backdropBackgroundColor: rgba(0, 61, 88, 0.5);
  --iconColor: var(--color-primary); /* icon background */
  --iconBackgroundColor: var(--color-white); /* icon fill */
  --boxShadow: 0 10px 40px rgba(0, 61, 88, 0.2);

  /* Branding and reject buttons are removed in JS; never show them */
  .stcm-logo,
  .stcm-credit-link,
  .stcm-reject-all,
  .stcm-modal-reject-all {
    display: none !important;
  }

  /* Links */
  a {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 3px;

    &:hover {
      color: var(--color-primary);
      text-decoration-thickness: 2px;
    }
  }

  /* Focus: same as the rest of the site */
  a:focus,
  #stcm-banner button:focus,
  #stcm-modal button:focus,
  #stcm-icon:focus {
    box-shadow: none;
  }

  a:focus-visible,
  button:focus-visible,
  #stcm-banner button:focus-visible,
  #stcm-modal button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 50px;
  }

  a:focus-visible {
    border-radius: 2px;
  }

  #stcm-icon:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
  }

  /* Buttons */
  .stcm-button {
    border: 2px solid var(--color-primary);
    border-radius: 50px;
    padding: 14px 30px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-family-sans-serif);
    font-size: var(--font-size-regular);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .stcm-button-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
  }
}

/* Banner */
#stcm-banner {
  border-top: 6px solid var(--color-secondary);
  border-radius: 0;
  box-shadow: var(--boxShadow);
  padding: 30px;
  width: 520px;

  p {
    font-size: var(--font-size-regular);
    line-height: var(--font-line-height-regular);
  }

  a {
    background-color: transparent;
  }

  .stcm-actions {
    margin-top: 20px;
  }

  .stcm-preferences-button {
    padding: 14px 0;
    color: var(--color-primary);
    font-family: var(--font-family-sans-serif);
    font-size: var(--font-size-regular);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 3px;

    span:hover {
      color: var(--color-primary);
    }

    &:hover {
      text-decoration-thickness: 2px;
    }
  }
}

/* Preferences modal */
#stcm-modal {
  border-top: 6px solid var(--color-secondary);
  border-radius: 0;
  box-shadow: var(--boxShadow);
  width: 700px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);

  h2 {
    margin: 0;
    color: var(--color-primary);
    font-family: var(--font-family-sans-serif);
    font-size: var(--font-size-medium-large);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
  }

  p {
    font-size: var(--font-size-regular);
    line-height: var(--font-line-height-regular);
    opacity: 1;
  }

  section {
    margin-top: 24px;
  }

  legend {
    font-size: var(--font-size-regular-medium);
  }

  .stcm-modal-close {
    border-radius: 50%;
  }

  /* Required toggle: shown as switched on, not greyed out */
  .stcm-toggle input:checked + .stcm-toggle-track {
    background: var(--color-primary);
  }

  .stcm-toggle input:disabled + .stcm-toggle-track {
    opacity: 1;
    filter: none;
  }

  .stcm-toggle:has(input:disabled) {
    cursor: not-allowed;
  }

  .stcm-toggle-off,
  .stcm-toggle-on {
    font-family: var(--font-family-sans-serif);
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-bold);
    top: 10px;
  }
}

/* Cookie icon to reopen the settings */
#stcm-icon {
  width: 52px;
  height: 52px;
  bottom: 16px;
  left: 16px;
  box-shadow: 0 4px 14px rgba(0, 61, 88, 0.3);

  svg {
    width: 30px;
    height: 30px;
  }

  &:hover {
    background-color: var(--color-secondary);
  }
}
