.floating_advice {
  position: fixed;
  right: 18px;
  bottom: 33px;
  z-index: 1200;
  width: 380px;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 66px);
  box-sizing: border-box;
  overflow: hidden auto;
  background: var(--balter-white);
  border: 1px solid #d8e0ea;
  border-left: 4px solid var(--balter-color-secondary-2-1);
  border-radius: 7px;
  box-shadow: 0 8px 28px rgba(24, 39, 58, 0.2);
  color: var(--balter-text-primary);
  font-size: 13px;
  line-height: 18px;
  text-align: left;

  &.good {
    border-left-color: var(--balter-color-secondary-2-1);
  }

  &.average {
    border-left-color: var(--balter-orange-1);
  }

  &.important {
    border-left-color: var(--balter-error-color);
  }

  & .floating_advice__header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 10px 8px 12px;
    background: #f5f8fb;
    border-bottom: 1px solid #e1e7ee;
  }

  & .floating_advice__title {
    min-width: 0;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    overflow-wrap: anywhere;

    & .fa {
      margin-right: 4px;
      color: var(--balter-primary-color);
    }
  }

  & .floating_advice__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #555555;
    cursor: pointer;

    &:hover,
    &:focus {
      background: #e7edf4;
      color: var(--balter-primary-color);
      outline: none;
    }
  }

  & .floating_advice__message {
    padding: 11px 12px 10px;
  }

  & .floating_advice__footer {
    padding: 10px 12px 12px;
    background: #fbfcfd;
    border-top: 1px solid #e5eaf0;
  }

  & .accounting_source_panel__status {
    display: grid;
    gap: 3px;
    font-size: 12px;
    line-height: 17px;

    & strong {
      font-size: 13px;
    }

    & span {
      color: var(--balter-text-secondary);
    }
  }

  & .accounting_source_panel__form {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);
    align-items: center;
    gap: 5px 10px;
    margin: 0;

    & label {
      font-size: 12px;
      line-height: 16px;
      font-weight: 700;
    }

    & select {
      width: 100%;
      height: 32px;
      box-sizing: border-box;
      padding: 4px 28px 4px 8px;
      border: 1px solid #bdc9d7;
      border-radius: 4px;
      background-color: var(--balter-white);
      color: var(--balter-text-primary);

      &:focus {
        border-color: var(--balter-color-primary-1);
        outline: 2px solid rgba(165, 33, 51, 0.12);
      }

      &:disabled {
        cursor: wait;
        opacity: 0.65;
      }
    }
  }

  & .accounting_source_panel__save_state {
    grid-column: 1 / -1;
    color: var(--balter-gray-1);
    font-size: 11px;
    line-height: 14px;

    &.saving {
      color: var(--balter-primary-color);
      font-weight: 600;
    }
  }

  @media only screen and (max-width: 767px) {
    right: 8px;
    bottom: 33px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 49px);

    & .accounting_source_panel__form {
      grid-template-columns: 1fr;
    }

    & .accounting_source_panel__save_state {
      grid-column: auto;
    }
  }
}
