.monster-content {
  .sheet-common();
  .character-sheet-common();
  overflow: scroll;
}

.monster-main {
  display: flex;

  .monster-left-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 4px;
    .monster-img {
      height: 140px;
      width: 140px;
      width: auto;
      border: none;
    }
  }

  .monster-pc {
    display: flex;
    gap: 10px;
    flex: 1;

    .monster-hp {
      display: flex;
      gap: 4px;
      align-items: center;
      margin-bottom: 4px;
      .name {
        flex: none;
        min-width: 2.5rem;
        max-width: 2.5rem;
      }
      .damage-resistance {
        flex: none;
        min-width: 6rem;
        max-width: 6rem;
      }
      input {
        flex: none;
        min-width: 2.2rem;
        max-width: 2.2rem;
        margin-left: 4px;
        font-size: calc(var(--font-size-standard) * 1);
      }
      .character-hp-max {
        clear: both;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin: 4px 0;
        align-items: center;
        input {
          width: 3.2rem;
          text-align: center;
          font-size: calc(var(--font-size-standard) * 1);
        }
      }
    }

    .monster-right {
      display: flex;
      flex-direction: column;
      gap: 4px;

      .monster-name {
        display: flex;
        input {
          width: 400px;
        }
      }
    }
  }

  .monster-pc-play {
    min-width: 400px;
  }

  .monster-pc-edit {
    min-width: 400px;
  }

  .monster-characteristics {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;

    .monster-characteristic {
      display: flex;
      align-items: center;
      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      span {
        min-width: 2.2rem;
        max-width: 2.2rem;
      }
      .form-group {
        flex: 1;
        padding-left: 4px;
        .form-fields {
          flex: none;
          width: 3rem;
        }
      }
    }
  }

  .monster-skills {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;

    .monster-skill {
      display: grid;
      grid-template-columns: repeat(3, auto 2.5rem);
      gap: 0.5rem;
      align-items: center;

      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      input {
        min-width: 2.2rem;
        max-width: 2.5rem;
      }
      .name {
        margin-left: 4px;
      }
      .form-group {
        padding-left: 4px;
        .form-fields {
          flex: none;
          width: 2.5rem;
        }
      }
    }
  }

  .monster-movements {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;

    .monster-movement {
      display: flex;
      flex-direction: column;
      gap: 4px;

      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      .name {
        flex: 1;
        min-width: 3rem;
        margin-left: 0.5rem;
      }
      .form-group {
        flex: 1;
        padding-left: 4px;
        .form-fields {
          flex: none;
          width: 50px;
        }
      }
    }
  }

  .monster-saves {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;

    .monster-save {
      display: flex;
      align-items: center;
      margin-right: 0.5rem;
      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      .name {
        flex: 0;
        min-width: 5rem;
        max-width: 5rem;
        margin-left: 0.5rem;
      }
      .name-pain {
        flex: 0;
        min-width: 3rem;
        max-width: 3rem;
        margin-left: 0.5rem;
      }
      .form-group {
        flex: 0;
        padding-left: 4px;
        .form-fields {
          flex: none;
          width: 50px;
        }
      }
    }
  }

  .monster-characteristics-play {
    min-width: 200px;
  }

  .monster-characteristic-edit {
    min-width: 200px;
  }
}

.tab.monster-biography .main-div {
  .biodata {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    .biodata-elem {
      display: flex;
      align-items: center;
      gap: 4px;
      .name {
        min-width: 8rem;
      }
    }
  }
}

.monster-biography {
  prose-mirror.inactive {
    min-height: 40px;
  }
  prose-mirror.active {
    min-height: 150px;
  }
}

.tab.monster-skills .main-div {
  display: grid;
  grid-template-columns: 1fr;
  legend {
    a {
      font-size: calc(var(--font-size-standard) * 1);
      padding-left: 4px;
    }
  }
  .skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .skill {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
      }
      .name {
        min-width: 12rem;
      }
    }
  }
  .gifts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .gift {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
      }
      .name {
        min-width: 12rem;
      }
    }
  }
  .vulnerabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .vulnerability {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
      }
      .name {
        min-width: 12rem;
      }
    }
  }
}

.tab.monster-equipment {
  display: grid;
  grid-template-columns: 1fr;
  legend {
    a {
      font-size: calc(var(--font-size-standard) * 1.4);
      padding-left: 4px;
    }
  }

  .moneys {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .equipments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .equipment {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
        margin: 4px 0 0 0;
      }
      .name {
        min-width: 12rem;
      }
    }
    .name {
      min-width: 12rem;
    }
  }
}

.tab.monster-combat {
  display: grid;
  grid-template-columns: 1fr;
  legend {
    a {
      font-size: calc(var(--font-size-standard) * 1.4);
      padding-left: 4px;
    }
  }

  .combat-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    .combat-detail {
      display: flex;
      align-items: center;
      gap: 4px;
      button {
        min-width: 10rem;
      }
      .armor-hp {
        min-width: 20rem;
        max-width: 20rem;
        .input {
          min-width: 3rem;
          max-width: 3rem;
        }
      }
    }
  }

  .attacks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    .attack {
      display: flex;
      align-items: center;
      gap: 4px;
      .name {
        min-width: 8rem;
        max-width: 8rem;
      }
      .damage-dice {
        width: 4rem;
        max-width: 3.5rem;
      }
      .numeric {
        width: 2.2rem;
      }
      .attack-icons a {
        margin-left: 4px;
        margin-right: 4px;
      }
    }
  }

  .ranged-attacks {
    grid-template-columns: 1fr;
    .attack {
      .name {
        min-width: 10rem;
        max-width: 10rem;
      }
      .damage-dice {
        width: 5rem;
        max-width: 5rem;
      }
    }
    .ranged-weapon-range {
      margin-top: 8px;
      border-top: 1px solid var(--color-border-light-tertiary, #ccc);
      padding-top: 6px;
      > label {
        font-weight: bold;
        margin-bottom: 4px;
        display: block;
      }
      .range-fields {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        .range-field {
          display: flex;
          flex-direction: column;
          align-items: center;
          label {
            font-size: 0.7rem;
            white-space: nowrap;
          }
          input {
            width: 3.5rem;
            text-align: center;
          }
        }
      }
    }
  }

  .armors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .armor {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
        margin: 4px 0 0 0;
      }
    }
    .name {
      min-width: 12rem;
    }
  }
}

.tab.monster-spells {
  display: grid;
  grid-template-columns: 1fr;
  legend {
    a {
      font-size: calc(var(--font-size-standard) * 1.4);
      padding-left: 4px;
    }
  }

  .spells {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .spell {
      display: flex;
      align-items: center;
      gap: 4px;
      .item-img {
        width: 24px;
        height: 24px;
      }
      .name {
        min-width: 12rem;
      }
    }
  }

  prose-mirror.inactive {
    min-height: 40px;
  }
  prose-mirror.active {
    min-height: 150px;
  }
}
