/* Tabs styles */
.tabs-container {
  margin-top: 2rem;
}

.tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: #374151;
  background-color: #f9fafb;
}

.tab-button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background-color: #eff6ff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.25rem;
  background-color: #ffffff;
}

.field-item-clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.field-item-clickable:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.field-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.field-label {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.field-required {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: #fee2e2;
  color: #991b1b;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.field-description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.field-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #f3f4f6;
  color: #4b5563;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.field-value-placeholder {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 0.375rem;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.875rem;
}

.file-attachment {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
}

.file-attachment .file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s;
}

.file-attachment .file-link:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

.file-attachment .file-icon {
  font-size: 1rem;
}

.file-attachment .file-name {
  color: #1e40af;
  font-weight: 500;
}

.empty-category {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
  font-style: italic;
}

/* Category header with edit button */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.category-header-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #ffffff;
  padding: 1rem 0;
  margin: -1rem 0 1.5rem 0;
  border-bottom: 2px solid #e5e7eb;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
}

/* View/Edit mode styles */
.view-mode,
.edit-mode {
  display: none;
}

.view-mode.active,
.edit-mode.active {
  display: block;
}

.field-value-display {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  color: #374151;
  font-size: 0.875rem;
  min-height: 2.5rem;
}

.field-value-display.empty {
  color: #9ca3af;
  font-style: italic;
  border-style: dashed;
}

/* Form field styles for edit mode */
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.field-checkbox-group,
.field-radio-group {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-checkbox-item,
.field-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-checkbox-item input[type="checkbox"],
.field-radio-item input[type="radio"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.field-checkbox-item label,
.field-radio-item label {
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}

/* Responsive tabs */
@media (max-width: 768px) {
  .tabs-nav {
    gap: 0.25rem;
  }

  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .field-item {
    padding: 1rem;
  }

  .category-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .category-actions {
    width: 100%;
  }

  .category-actions .btn {
    flex: 1;
  }
}