._hj-widget-container {
  /* Backdrop */
  & > div > div > div > div {
    width: 100vw !important;
    background: rgba(221, 221, 221, 0.467) !important;
    backdrop-filter: blur(12px);
  }

  /* Top styling for modal & bottom dialog */
  dialog > div,
  div:has(> div[role='dialog']) {
    border-top: 1px solid #00803e;

    & > div:first-of-type::before {
      content: '';
      position: absolute;
      width: 24px;
      height: 24px;
      background-color: #ffe500;
      border-radius: 50%;
      left: 12px;
      top: -12px;
      z-index: 99;
    }
  }

  /* Dialog specific tweaks */
  dialog > div {
    border-radius: 0px 0px 8px 8px !important;

    & > div {
      height: 0px !important;
    }
  }

  div:has(> div[role='dialog']) {
    border-radius: 0px !important;
    overflow: visible !important;
  }

  /* Input, textarea & button common styling */
  input,
  textarea,
  button {
    box-shadow: none !important;

    &:focus,
    &:focus-visible {
      outline: 3px solid #6bcbe9 !important;
      border: none !important;
    }
  }

  /* Text input & textarea */
  textarea,
  input[type='text'] {
    border: none !important;
    border-top: 1px solid #cacaca !important;
    background-color: #fafafa !important;
    padding: 12px 8px !important;
  }

  /* Form layout */
  form {
    div:nth-of-type(1) > div {
      gap: 8px !important;
    }

    /* Submit buttons container */
    div:nth-of-type(2) > div {
      flex-direction: column !important;
      gap: 8px !important;

      /* Submit button */
      button {
        border-radius: 24px !important;
        border: none !important;
        border-bottom: 1px solid #004820 !important;
        width: 100% !important;
        height: 48px !important;
        font-weight: 600 !important;

        &:hover {
          background-color: #004820 !important;
          border-color: #000000 !important;
        }

        &:disabled {
          border-color: #dddddd !important;
        }

        &:active {
          transform: scale(0.9);
        }
      }

      /* Cancel button */
      button:nth-of-type(2) {
        color: #00803e !important;
        background-color: #ffffff !important;
        border-color: #dddddd !important;
        text-decoration: none !important;

        &:hover {
          background-color: #dddddd !important;
          border-color: #cacaca !important;
        }
      }
    }
  }

  /* Close button */
  button[aria-label='Lukk'],
  #hj-survey-toggle-1 {
    position: absolute;
    top: -17px;
    right: 0px;
    background-color: white;
    border-radius: 50% !important;
    width: 32px;
    height: 32px;
    border: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;

    & > span > span {
      display: none !important;
    }

    svg path {
      fill: #00803e !important;
    }

    &:hover {
      background-color: #dddddd !important;
    }

    &:focus,
    &:focus-visible {
      outline: none !important;
      border: none !important;
    }
  }

  /* Checked radio/checkbox styling */
  label:has(input:checked) {
    background-color: #e7f4d0 !important;

    &:hover {
      background-color: #d3ebaa !important;
    }
  }

  /* Checked radio */
  input[type='radio']:checked + span {
    position: relative;
  }

  /* Checked checkbox */
  input[type='checkbox']:checked + span {
    background-color: #00803e !important;

    svg {
      width: 21px !important;
      height: 21px !important;
    }

    &:hover {
      background-color: #004820 !important;
    }
  }

  /* Dot inside radio */
  input[type='radio']:checked + span::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: green;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* Radio block */
  label {
    height: 48px;
    border-radius: 8px !important;
    border-bottom: 1px solid #dddddd !important;
    box-shadow: none !important;
    align-items: center !important;
    padding-left: 8px !important;
    background-color: #fafafa !important;

    &:hover {
      box-shadow: none !important;
      background-color: #dddddd !important;
      border-color: #dddddd !important;
    }

    /* Radio circle */
    & > div > span {
      width: 32px !important;
      height: 32px !important;
      box-shadow: none !important;
      border: 2px solid #00803e;
    }
  }
}
