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

.starship-main {
  background-color: var(--color-light-1);
  display: flex;

  .starship-pc {
    display: flex;
    gap: 4px;
    flex: 1;

    .starship-left {
      min-width: 180px;
      display: flex;
      flex-direction: column;

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

      .spec {
        label {
          max-width: 4rem;
        }
        input {
          max-width: 4rem;
        }
      }
    }

    .starship-right {
      display: flex;
      flex-direction: column;
      gap: 5px;

      .starship-name {
        display: flex;
        input {
          font-family: var(--font-title);
          font-size: calc(var(--font-size-standard) * 1.4);
          width: 400px;
        }
      }

      .capacity {
        .dice-2d6 {
          max-width: 1.5rem;
          margin-left: 0.2rem;
        }
        .rollable:hover,
        .rollable:focus {
          text-shadow: 0 0 8px var(--color-shadow-primary);
          cursor: pointer;
        }
        .hull-field {
          select {
            min-width: 10rem;
            max-width: 10rem;
          }
        }
        label {
          margin-left: 0.2rem;
          max-width: 7rem;
          min-width: 7rem;
        }
        .flexrow-guns {
          display: flex;
          align-items: center;
          align-self: center;
          gap: 4px;
          .starship-guns-label {
            min-width: 7.4rem;
            max-width: 7.4rem;
            font-weight: bold;
          }
        }
        input {
          max-width: 5rem;
        }
        select {
          max-width: 5rem;
        }
      }
      .cargo {
        label {
          margin-left: 0.2rem;
          min-width: 4rem;
          max-width: 4rem;
        }
        input {
          max-width: 6rem;
        }
        select {
          max-width: 5rem;
        }
        .npc-crew-field {
          display: flex;
          align-items: center;
          gap: 4px;
          .npc-crew-roll {
            cursor: pointer;
            color: var(--color-text-dark-primary);
            &:hover {
              color: var(--color-text-hyperlink);
            }
          }
        }
      }

      .starship-infos {
        display: flex;
        flex-direction: column;
        gap: 4px;

        label {
          min-width: 120px;
        }

        .starship-hp {
          display: flex;
          gap: 2px;
          align-items: center;
          .starship-hp-value {
            .form-fields input {
              flex: none;
              width: 50px;
              margin-left: 4px;
              font-size: calc(var(--font-size-standard) * 1.4);
            }
          }
          .starship-hp-max {
            clear: both;
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            margin: 3px 0;
            align-items: center;
            input {
              width: 50px;
              text-align: center;
              font-size: calc(var(--font-size-standard) * 1.4);
            }
          }
          .hp-separator {
            font-size: calc(var(--font-size-standard) * 1.2);
            display: flex;
            align-items: center;
            justify-content: center;
          }
        }
      }
    }
  }

  .starship-pc-play {
    min-width: 500px;
  }

  .starship-pc-edit {
    min-width: 500px;
  }
}

.starship-description {
  background-color: var(--color-light-1);
  prose-mirror.inactive {
    min-height: 40px;
  }
  prose-mirror.active {
    min-height: 150px;
  }
  .field-label {
    margin-left: 8px;
  }

  .section-editor {
    min-height: 10rem;
    .editor {
      min-height: 10rem;
    }
    .editor-content {
      min-height: 10rem;
    }
  }

  .biodata {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    label {
      min-width: 3rem;
    }
    .feature {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 18rem;
      max-width: 18rem;
    }
  }
}

.tab.starship-equipment {
  background-color: var(--color-light-1);
  display: grid;
  grid-template-columns: 1fr;
  legend {
    a {
      font-size: calc(var(--font-size-standard) * 1.4);
      padding-left: 5px;
    }
  }
  .crew {
    .crew-list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      padding: 4px;
    }
    .crew-member {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--color-border-dark);
      border-radius: 4px;
      background: var(--color-light-2);
      .crew-img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1px solid var(--color-border-dark);
        cursor: pointer;
        &:hover {
          opacity: 0.8;
          box-shadow: 0 0 4px var(--color-shadow-primary);
        }
      }
      .crew-name {
        flex: 1;
        font-size: var(--font-size-small);
        cursor: pointer;
        &:hover {
          color: var(--color-text-dark-highlight);
          text-shadow: 0 0 4px var(--color-shadow-primary);
        }
      }
      .controls {
        display: flex;
        gap: 4px;
        min-width: 3rem;
        a {
          color: var(--color-text-dark-primary);
          &:hover {
            color: var(--color-text-dark-highlight);
          }
        }
        .pilot-button {
          color: var(--color-text-light-primary);
          &:hover {
            color: var(--color-text-light-highlight);
          }
        }
      }
    }
    .crew-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 8px;
      font-style: italic;
      color: var(--color-text-dark-secondary);
    }
  }

  .weapons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    .weapon {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 13rem;
      max-width: 13srem;
      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      .controls {
        min-width: 2rem;
        max-width: 2rem;
      }
      .damage {
        min-width: 5rem;
        max-width: 5rem;
      }
      .name {
        min-width: 8rem;
        max-width: 8rem;
      }
      .item-img {
        width: 32px;
        height: 32px;
        margin: 4px 0 0 0;
      }
    }
  }
  .gears {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    .gear {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 13rem;
      max-width: 13srem;
      .rollable:hover,
      .rollable:focus {
        text-shadow: 0 0 8px var(--color-shadow-primary);
        cursor: pointer;
      }
      .controls {
        min-width: 2rem;
        max-width: 2rem;
      }
      .damage {
        min-width: 5rem;
        max-width: 5rem;
      }
      .name {
        min-width: 8rem;
        max-width: 8rem;
      }
      .item-img {
        width: 32px;
        height: 32px;
        margin: 4px 0 0 0;
      }
    }
  }

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