@use '_theme.scss';

.draft-list-section {
  margin-bottom: 50px;

  @media (max-width: theme.$sm) {
    margin-bottom: 30px;
  }

  .draft-list-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--color-fill);
    cursor: pointer;
    user-select: none;

  }

  .draft-list-section-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .draft-list-section-arrow {
    transition: transform 0.2s ease;

    &.arrow-up {
      transform: rotate(180deg);
    }

    &.arrow-down {
      transform: rotate(0deg);
    }
  }

  .draft-list-section-title {
    font-size: var(--text-size-h4);
    color: var(--text-color-ultra-dark);

    @media (max-width: theme.$sm) {
      font-size: var(--text-size-label);
    }
  }

  .draft-list-section-actions {
    display: flex;
    align-items: center;
  }

  .draft-delete-all-text,
  .draft-delete-all-icon {
    display: flex;
    align-items: center;
    gap: 5px;

    &:disabled {

      cursor: not-allowed;
      color: var(--text-color-disabled);
    }

    @media (max-width: theme.$md) {
      color: var(--text-color-ultra-dark);
    }
  }

  .draft-delete-all-icon svg rect,
  .draft-delete-all-icon svg path {
    stroke: var(--color-icon);
  }

  .draft-delete-all-count {
    color: inherit;
  }

  .draft-list-section-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;

    &.is-expanded {
      grid-template-rows: 1fr;

      .draft-list-section-body-inner {
        overflow-y: visible;
      }
    }

    &.is-collapsed {
      grid-template-rows: 0fr;
    }
  }

  .draft-list-section-body-inner {
    overflow-y: hidden;
  }

  .draft-list-empty {
    padding: 20px;
    font-size: var(--text-size-label);
    color: var(--text-color-medium);
    border-bottom: 2px solid var(--color-line);
  }
}