@use "sass:math";

.pair-player,
.pair-feedback,
.pair-paper,
.pair-editor {
  .items-col,
  .pairs-col {
    ul {
      padding: 0;
      margin: 0;
      list-style-type: none;
    }
  }
}

.pair-editor {
  .pair,
  .item {
    display: flex;

    .text-fields {
      margin-right: ($grid-gutter-width * .5);
    }
  }

  .odd-score,
  .association-score {
    width: $score-input-size;
    margin-right: ($grid-gutter-width * .5);
  }

  .pair {
    // Display both items on the same line
    .form-group {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: $answer-item-padding;
    }

    .pair-item {
      background-color: var(--#{$prefix}body-bg);
      border: $input-border-width solid var(--#{$prefix}body-bg);
      padding: $input-padding-y $input-padding-x;
      line-height: $input-line-height;
      border-radius: var(--#{$prefix}border-radius);

      .item-content {
        text-overflow: ellipsis;
        overflow: hidden;
        max-height: 80px;

        > p { // remove margin on tinyMCE container
          margin-bottom: 0;
        }
      }

      .btn-pin-item {
        padding: 0;
        border: none;
      }

      .btn-pin-item.btn-disabled {
        color: #aaa;
      }
    }
  }
}

/* PLAYER */
.pair-player {
  .pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: $answer-item-padding;

    .pair-item {
      background-color: var(--#{$prefix}body-bg);
      border: $answer-item-border-width solid var(--#{$prefix}body-bg);
      padding: $answer-item-padding;
      border-radius: var(--#{$prefix}border-radius);
    }

    .drop-placeholder {
      flex: 1;
      padding: $answer-item-padding;
      border-radius: var(--#{$prefix}border-radius);
    }
  }

  .item-content {
    overflow-y: auto;
    max-height: 200px;

    > p { // remove margin on tinyMCE container
      margin-bottom: 0;
    }
  }
}

.pair-feedback,
.pair-paper {
  .item,
  .unanswered-item {
    display: flex;
    padding: 5px;
    width: 100%;
    align-items: center;
    min-height: 34px;
    justify-content: space-between;
  }

  .item-content {
    overflow-y: auto;
    max-height: 200px;

    > p { // remove margin on tinyMCE container
      margin-bottom: 0;
    }
  }
}

.pair-paper {
  .unanswered-item {
    padding: 10px;
    margin-top: 10px;
  }
}

.pair-answer-item {
  display: flex;
  flex-direction: row;
  align-items: center;

  .pair-item-content {
    margin-right: auto;
  }

  .item-actions {
    margin-left: ($answer-item-padding * .5);
  }
}
