.compare-popup {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 300px;
  background: white;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Desktop */
  @media (min-width: 768px) {
    padding: 15px 20px 20px;
    gap: 10px;
  }
  /* Mobile */
  @media (max-width: 767.5px) {
    padding: 5px 10px 10px;
    font-size: 14px;
    gap: 5px;
    width: 250px;
  }

  .popup-header {
    color: var(--gray-500);
    font-weight: 700;
  }

  .tool {
    display: flex;

    span {
      flex: 1;
    }

    button {
      cursor: pointer;
      &:hover {
        color: darkred;
      }
    }
  }
}

main.tool-compare {
  padding: 20px;
  margin: 0 auto;
  width: min-content;
  display: flex;
  flex-direction: column;
  gap: 40px;

  > .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 36px;
    font-weight: 700;
    /* background: lightpink; */

    span {
      flex-grow: 1;
    }
  }

  .compare-wrap {
    display: flex;
    gap: 20px;

    .add-tool {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 300px;

      form > div {
        display: flex;
        flex-direction: column;
        gap: 10px;

        select {
          width: 100%;
        }
      }
    }
  }

  table {
    position: relative;

    thead {
      position: sticky;
      top: 0;
      background: white;

      th {
        font-weight: bold;
        font-size: 20px;
      }

      .tool-name {
        display: flex;
        width: 100%;

        span {
          flex: 1;
        }

        .fa-trash {
          color: rgb(146, 18, 18);
        }
      }
    }

    th,
    td {
      vertical-align: top;
    }

    th,
    td {
      &:not(:first-child) {
        /* Desktop */
        @media (min-width: 768px) {
          width: 400px;
          min-width: 400px;
          padding: 20px;
        }
        /* Mobile */
        @media (max-width: 767.5px) {
          width: 70vw;
          padding: 10px;
        }
      }
    }

    tbody {
      th {
        position: sticky;
        left: 0;
        background: white;
      }

      td {
        /* Breaks long URLs */
        word-break: break-all;
      }
    }

    tr.prop-group {
      td,
      th {
        background: var(--gray-100);
        font-weight: bold;
        padding-left: 5px;
      }
    }
  }
}
