.class-content {
  .sheet-common();
  .item-sheet-common();

  .header {
    display: flex;
    img {
      width: 50px;
      height: 50px;
    }
  }

  label {
    flex: 10%;
  }

  .advancement-level {
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;

    h3 {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 0 0 0.5rem 0;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);

      .level-title {
        color: #000000;
        font-weight: bold;
        font-size: 80%;
      }

      .add-advancement {
        padding: 0.25rem 0.5rem;
        background: var(--color-control-bg);
        border: 1px solid var(--color-border-dark);
        border-radius: 3px;
        cursor: pointer;

        &:hover {
          background: var(--color-control-bg-hover);
        }

        i {
          margin: 0;
        }
      }
    }

    .empty-advancements {
      font-style: italic;
      color: rgba(0, 0, 0, 0.5);
      margin: 0.5rem 0;
    }
  }

  .advancement-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .advancement-item {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;

    .advancement-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.5rem;

      .advancement-icon {
        width: 40px;
        height: 40px;
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 3px;
        cursor: pointer;
        flex-shrink: 0;

        &:hover {
          border-color: var(--color-border-highlight);
        }
      }

      input[type="text"] {
        flex: 1;
        font-weight: bold;
      }

      .toggle-advancement-description {
        padding: 0.25rem 0.5rem;
        background: var(--color-control-bg);
        border: 1px solid var(--color-border-dark);
        border-radius: 3px;
        cursor: pointer;
        flex-shrink: 0;
        margin-left: 0.25rem;

        &:hover {
          background: var(--color-control-bg-hover);
        }

        i {
          margin: 0;
          color: rgba(0, 0, 0, 0.7);
        }
      }

      .delete-advancement {
        padding: 0.25rem 0.5rem;
        background: var(--color-control-bg);
        border: 1px solid var(--color-border-dark);
        border-radius: 3px;
        cursor: pointer;
        flex-shrink: 0;

        &:hover {
          background: rgba(255, 0, 0, 0.1);
          border-color: rgba(255, 0, 0, 0.5);
        }

        i {
          margin: 0;
          color: rgba(255, 0, 0, 0.7);
        }
      }
    }

    .advancement-description {
      margin-top: 0.5rem;
      overflow: hidden;
      transition:
        max-height 0.3s ease-out,
        opacity 0.3s ease-out;
      max-height: 500px;
      opacity: 1;

      &.collapsed {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
      }
    }
  }
}
