/*
* Osano cookie consent
* Custom styling to override default styles, will need to be imported in on every app that uses it
*/

/* Hide the button to open the dialog (users can access from footer/company site) */
.osano-cm-widget {
  display: none;
}

.osano-cm-window {
  --osano-info-dialog-background-color: var(--color-foundations-white, #fff);

  font-family: inherit;
}

/* Dialog */
.osano-cm-dialog {
  max-width: 500px;
  border-radius: var(--border-radius-s, 5px);
  background: var(--color-foundations-white, #fff);
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / 20%);
  line-height: 1.5;

  /* Add a custom heading to the dialog */
  & .osano-cm-content::before {
    display: block;
    margin-bottom: 0.75rem;
    content: 'We value your privacy\a';
    font-size: var(--text-heading-h2-size, 1.5rem);
    font-weight: bold;
    line-height: var(--text-heading-h2-line-height, 1.33);
  }

  /* Hide the close button, forcing users to use the buttons below */
  & .osano-cm-dialog__close {
    display: none;
  }

  /* Wrap the buttons within the dialog, and reorder/style */
  & .osano-cm-dialog__buttons {
    gap: 0.5rem;

    & .osano-cm-manage,
    & .osano-cm-denyAll {
      background-color: var(--color-grey-300, #dfe3e5);
      color: var(--content-default-body, #242424);

      &:hover,
      &:focus {
        background-color: var(--color-grey-400, #b5c1c6);
      }
    }

    & .osano-cm-accept-all {
      order: 1;
    }

    & .osano-cm-denyAll {
      order: 2;
    }

    & .osano-cm-manage {
      min-width: initial;
      flex: 0 0 auto;
      order: 3;
      background-color: transparent;
      color: var(--content-default-body, #242424);

      &:hover,
      &:focus {
        background-color: var(--color-grey-300, #dfe3e5);
        color: var(--content-default-body, #242424);
      }
    }
  }
}

/* Button */
.osano-cm-button {
  display: inline-flex;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: var(--border-radius-s, 5px);
  margin: 0;
  background-color: var(--btn-secondary, #13263f);
  color: var(--btn-secondary-foreground, #fff);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;

  &:hover,
  &:focus {
    background-color: var(--btn-secondary-hover, #475568);
  }
}

/* Toggle */
.osano-cm-toggle {
  --osano-toggle-track-color: var(--color-grey-300, #dfe3e5);
  --osano-toggle-off-track-color-hover: var(--color-grey-400, #b5c1c6);
}

/* "Info" aside panel */
.osano-cm-info-dialog {
  --osano-dialog-foreground-color: var(--color-grey-800, #242424);
  --osano-link-color: var(--color-foundations-link, #0072cc);
  --osano-info-dialog-toggle-on-track-color: var(--color-neutral-500, #13263f);

  /* Top header */
  & .osano-cm-header {
    font-weight: bold;
  }

  /* Toggles and toggle labels */
  & .osano-cm-drawer-toggle {
    &.osano-cm-toggle--disabled {
      cursor: not-allowed;

      & .osano-cm-toggle__switch {
        cursor: not-allowed;
        opacity: 0.2;
      }
    }

    & .osano-cm-label {
      font-weight: bold;
    }
  }

  /* Dropdown list */
  & .osano-cm-disclosure__list {
    background-color: var(--color-grey-50, #f9fafb);
  }
}

.osano-cm-consent-id-box {
  display: none;
}
