/* General Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  color: #333;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 20px;
}

h1 {
  text-align: center;
  color: #495057;
  margin-bottom: 42px;
}

button {
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

input[type='text'] {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  flex-grow: 1;
}

/* Board Grid */
.todo-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
  grid-template-rows: masonry;
  gap: 20px;
}

/* Individual List Card */
.todo-list-card {
  background-color: #ffffff;
  border-radius: 8px;
  border-top: 4px solid #6c757d; /* Default border color */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Ensure border-radius clips content */
  transition: box-shadow 0.2s ease;
}

.todo-list-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
}

.list-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  word-break: break-word; /* Prevent long titles from overflowing */
  flex-grow: 1;
  margin-right: 10px;
}

.list-actions button {
  background: none;
  border: none;
  color: #6c757d;
  padding: 5px;
  margin-left: 5px;
  line-height: 1; /* Ensure icon buttons align well */
}

.list-actions button:hover {
  color: #343a40;
}

/* Style for SVG icons inside buttons */
.list-actions button svg {
  vertical-align: middle; /* Helps align icon with text if there were any */
  display: inline-block; /* Ensure it takes space correctly */
}

/* Optionally change stroke color on hover */
.list-actions button:hover svg {
  stroke: #dc3545; /* Change to red on hover, for example */
}

.list-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.tasks-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0; /* Space below tasks before add form */
  flex-grow: 1;
}

.task-item {
  display: flex;
  /* Align checkbox and text vertically */
  align-items: center;
  gap: 10px;
  padding: 8px 0; /* Vertical padding for tasks */
  font-size: 14px;
}

.task-item input[type='checkbox'] {
  /* Remove margin-top as align-items: center handles alignment */
  flex-shrink: 0;
}

.task-item label {
  flex-grow: 1;
  word-break: break-word; /* Allow long task text to wrap */
  line-height: 1.4;
}

.task-item label.completed {
  text-decoration: line-through;
  color: #adb5bd;
}

.add-task-form {
  display: flex;
  gap: 8px; /* Slightly reduced gap */
  margin-top: auto; /* Push form to the bottom */
  padding-top: 10px; /* Add some space above the form */
  border-top: 1px solid #e9ecef; /* Add a subtle separator line */
}

.add-task-form input {
  min-width: 0; /* Allow input to shrink */
  border: 1px solid #ced4da;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 4px;
  flex-grow: 1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Add transition */
}

.add-task-form input:focus {
  outline: none;
  border-color: #adb5bd;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.add-task-form button {
  background-color: transparent; /* Remove background */
  color: #6c757d; /* Muted text color */
  border: 1px solid #ced4da; /* Subtle border */
  padding: 8px 12px; /* Adjust padding */
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; /* Update transitions */
}

.add-task-form button:hover {
  background-color: #e9ecef; /* Light grey background on hover */
  border-color: #adb5bd; /* Slightly darker border on hover */
  color: #495057; /* Darker text on hover */
}

.add-task-form button:active {
  /* Keep active state simple for subtle button */
  background-color: #dee2e6;
  border-color: #adb5bd;
  color: #495057;
  transform: none; /* Remove scaling effect */
}

/* Add List Card */
.add-list-card {
  border: 2px dashed #ced4da;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px; /* Give it some minimum height */
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; /* Added color transition */
  cursor: pointer; /* Make the whole card indicate it's clickable */
  text-align: center; /* Center the text */
  color: #495057; /* Set text color */
  font-size: 16px; /* Set text size */
  font-weight: 500; /* Set text weight */
}

.add-list-card:hover {
  background-color: rgba(233, 236, 239, 0.7); /* Slightly darker background */
  border-color: #adb5bd;
  color: #343a40; /* Darker text on hover */
}

/* Color borders (Example - add more as needed) */
.border-violet {
  border-top-color: #8f00ff;
}
.border-green {
  border-top-color: #28a745;
}
.border-teal {
  border-top-color: #20c997;
}
.border-cyan {
  border-top-color: #17a2b8;
}
.border-orange {
  border-top-color: #fd7e14;
}
.border-pink {
  border-top-color: #e83e8c;
}
.border-blue {
  border-top-color: #007bff;
}
.border-red {
  border-top-color: #dc3545;
}
.border-yellow {
  border-top-color: #ffc107;
}
.border-slate {
  border-top-color: #6c757d;
}
