.formGeneratorList {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  font-family: var(--font-family);
  min-height: 0;
  max-height: 100%;
  padding: 0;
  height: 100%;
}

/* List Container */
.listContainer {
  position: relative;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  max-height: none;
  flex: 1;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.emptyList {
  min-height: auto;
  height: auto;
  max-height: none;
}

.emptyMessage {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text);
  opacity: 0.6;
}

.loadingState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--color-text-secondary, #666);
}

.loadingSpinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-bg-secondary, #e9ecef);
  border-top: 3px solid var(--color-primary, #007bff);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* List Header */
.listHeader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-medium-gray);
  background: transparent;
  position: static;
  padding: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  margin-top: 10px;
}

.selectAllCheckbox {
  cursor: pointer;
  transform: scale(1.3);
  width: 16px;
  height: 16px;
  accent-color: var(--color-secondary);
  margin: 0;
  padding: 0;
  border: 2px solid var(--color-primary);
  border-radius: 3px;
  background: var(--color-bg);
  flex-shrink: 0;
}

.selectAllCheckbox:checked {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.listTitle {
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.headerButtonWrapper {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Style buttons inside headerButtonWrapper to match ActionButton styling */
.headerButtonWrapper button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  min-width: 28px;
  min-height: 28px;
  background: var(--color-secondary);
  color: var(--color-bg);
}

.headerButtonWrapper button:hover {
  background: var(--color-secondary-hover);
}

.headerButtonWrapper button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.headerButtonWrapper button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--color-secondary-rgb), 0.3);
}

/* Style icons inside headerButtonWrapper buttons */
.headerButtonWrapper button svg,
.headerButtonWrapper button .actionIcon {
  font-size: 16px;
  height: 16px;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.headerDeleteButtonContainer {
  flex-shrink: 0;
  margin-left: 0.5rem;
  position: relative;
}

.headerDeleteButton {
  flex-shrink: 0;
}

.listCount {
  font-size: 0.75rem;
  color: var(--color-gray);
  font-weight: 400;
}

.sortControls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sortButton {
  padding: 6px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sortButton:hover {
  background: var(--color-gray-disabled);
  border-color: var(--color-secondary);
}

.sortButton.active {
  background: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary);
}

.sortIcon {
  font-size: 12px;
  color: inherit;
}

/* Items List */
.itemsList {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.listItem {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  border-top: 1px solid var(--color-medium-gray);
  border-bottom: 1px solid var(--color-medium-gray);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  gap: 0.5rem;
  animation: slideInFromTop 0.3s ease-out;
  box-shadow: none;
  margin-top: -1px;
}

.listItem:first-child {
  border-top: none;
}

.listItem:hover {
  background: var(--color-highlight-gray);
  border-color: var(--color-medium-gray);
  box-shadow: none;
}

.listItem.selected {
  background: var(--color-highlight-gray);
  border-left: none;
  border-right: none;
}

.listItem.clickable {
  cursor: pointer;
}

.itemSelect {
  flex-shrink: 0;
  padding-top: 0;
}

.itemCheckbox {
  cursor: pointer;
  transform: scale(1.3);
  width: 16px;
  height: 16px;
  accent-color: var(--color-secondary);
  margin: 0;
  padding: 0;
  border: 2px solid var(--color-primary);
  border-radius: 3px;
  background: var(--color-bg);
}

.itemCheckbox:checked {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.itemCheckbox:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.itemActions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.itemFields {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
  padding-left: 0;
  margin-left: 0;
}

.metadataFields {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.625rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
}

.itemField {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.itemField:first-child {
  gap: 0;
  margin-bottom: 0;
}

.itemField:first-child .fieldValue {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.metadataFields .itemField {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}

.metadataFields .itemField .fieldValue {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-secondary, #666);
  opacity: 0.8;
  display: inline;
}

/* Date field styling (first in metadata) */
.metadataFields .itemField:first-child .fieldValue {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-secondary, #666);
  opacity: 0.8;
}

/* Status Badge Styling */
.statusBadge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-transform: capitalize;
}

/* Status color variants */
.statusBadge.completed {
  background-color: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.statusBadge.pending {
  background-color: rgba(251, 191, 36, 0.15);
  color: #d97706;
}

.statusBadge.failed {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.statusBadge.active {
  background-color: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.fieldLabel {
  display: none;
}

.fieldValue {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.fieldInput {
  width: 100%;
}

.fieldSelect {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.fieldSelect:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px rgba(var(--color-secondary), 0.1);
}

.fieldCheckbox {
  cursor: pointer;
  transform: scale(1.2);
  width: 18px;
  height: 18px;
  accent-color: var(--color-secondary);
  margin: 0;
  padding: 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid var(--color-primary);
  flex-shrink: 0;
  background: var(--color-bg);
  border-radius: 0 0 8px 8px;
}

.pageSizeSelector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}

.pageSizeSelector label {
  white-space: nowrap;
  font-family: var(--font-family);
}

.pageSizeSelect {
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  min-width: 60px;
}

.pageSizeSelect:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.paginationButton {
  padding: 8px 12px;
  border: 1px solid var(--color-gray-disabled);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.2s ease;
}

.paginationButton:hover:not(:disabled) {
  background: var(--color-gray-disabled);
  border-color: var(--color-secondary);
}

.paginationButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.paginationInfo {
  font-size: 14px;
  color: var(--color-text);
  margin: 0 15px;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .listContainer {
    max-height: calc(100vh - 350px);
  }

  .emptyList {
    min-height: auto;
    height: auto;
  }

  .listHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sortControls {
    width: 100%;
    flex-direction: column;
  }

  .sortButton {
    width: 100%;
    justify-content: space-between;
  }

  .listItem {
    flex-direction: column;
    gap: 10px;
  }

  .itemFields {
    width: 100%;
  }

  .pagination {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .pageSizeSelector {
    order: -1;
    justify-content: center;
  }

  .paginationInfo {
    text-align: center;
    margin: 0;
    font-size: 13px;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .listItem:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .listItem.selected {
    background: rgba(var(--color-secondary-rgb), 0.2);
  }

  .fieldValue {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Custom scrollbar for list container */
.listContainer::-webkit-scrollbar {
  width: 4px;
}

.listContainer::-webkit-scrollbar-track {
  background: transparent;
}

.listContainer::-webkit-scrollbar-thumb {
  background: var(--color-medium-gray);
  border-radius: 2px;
}

.listContainer::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-disabled);
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


