/* src/assets/available-tasks.css */

/* Specific styles for available tasks list */
#availableTasksList .list-group-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease-in-out;
}

#availableTasksList .list-group-item:hover {
  background-color: #f8f9fa; /* Very subtle grey on hover */
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

#availableTasksList .list-group-item .task-details {
  flex-grow: 1;
  margin-right: 15px;
}

#availableTasksList .list-group-item .task-actions {
  display: flex;
  gap: 8px; /* Slightly less space for actions here */
  margin-top: 15px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  #availableTasksList .list-group-item .task-actions {
    margin-top: 0;
  }
}

.task-status-badge {
  font-size: 0.85em;
  padding: 0.3em 0.6em;
  border-radius: 0.25rem;
  font-weight: 500;
}

.task-deadline {
  font-weight: 500;
}
.task-deadline.text-danger {
  /* Overdue */
  color: #e74c3c !important;
}
.task-deadline.text-warning {
  /* Soon */
  color: #f39c12 !important;
}
.task-deadline.text-success {
  /* Plenty of time */
  color: #2ecc71 !important;
}
.task-deadline.text-muted.none {
  color: #6c757d !important;
}

/* Enhancements for filter bar */
.filter-bar {
  background-color: #e9ecef;
  border-radius: 0.75rem; /* Consistent rounding */
  padding: 1.5rem; /* More padding */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
}

/* Alert for no items */
.alert.alert-info {
  border-radius: 0.75rem;
  background-color: #e0f7fa;
  color: #00796b;
  border-color: #b2ebf2;
}

/* Additional styling for the card header on this page */
.card-header.bg-primary {
  background: linear-gradient(
    135deg,
    #3498db,
    #2980b9
  ) !important; /* Blue gradient */
}

/* --- Added/Modified for Navbar & Sidebar Consistency --- */

/* Custom Primary Color for Navbar */
.bg-lightblue {
  background-color: #1c78b2 !important; /* Your desired blue color */
}

/* Ensure navbar brand and links are white */
.navbar-brand,
.navbar-nav .nav-link,
.navbar-nav .dropdown-toggle {
  color: #fff !important; /* White color for all primary navbar text */
}

/* Sidebar active item styling to keep dark text and blue border */
.list-group-item.active {
  background-color: #e9ecef !important; /* Keep a light background for active state */
  color: #212529 !important; /* Force text color to black/dark gray for active item */
  border-color: #1c78b2 !important; /* Explicitly set border color to the navbar blue */
  border-left: 5px solid #1c78b2 !important; /* Thicker left border for emphasis */
}

.list-group-item.active .fas {
  color: #212529 !important; /* Ensure icon color is also dark */
}

/* Adjust hover state for consistent visual feedback */
.list-group-item.bg-light:hover {
  background-color: #e2e6ea !important; /* Slightly darker hover for light background */
}

/* Responsive adjustments from previous files (if not already global) */
@media (max-width: 768px) {
  #sidebar-wrapper {
    width: 0; /* Collapse sidebar on smaller screens */
    overflow: hidden;
    position: absolute; /* Take out of flow */
    height: 100%;
    z-index: 1000;
    transition: width 0.3s ease;
  }

  #page-content-wrapper {
    margin-left: 0; /* Remove margin when sidebar is collapsed */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Adjustments for filter bars on smaller screens if applicable */
  .filter-bar .row > div[class*="col-"] {
    width: 100%;
    margin-bottom: 1rem;
  }
  .filter-bar .row > div[class*="col-"]:last-child {
    margin-bottom: 0;
  }

  /* General list item adjustments for smaller screens */
  #availableTasksList .list-group-item {
    flex-direction: column;
    align-items: flex-start;
  }
  #availableTasksList .list-group-item .task-details {
    margin-right: 0;
    width: 100%;
    margin-bottom: 10px;
  }
  #availableTasksList .list-group-item .task-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap; /* Allow buttons to wrap */
  }
  #availableTasksList .list-group-item .task-actions .btn {
    flex-grow: 1;
    margin-bottom: 0.5rem; /* Space between stacked buttons */
  }
  #availableTasksList .list-group-item .task-actions .btn:last-child {
    margin-bottom: 0;
  }
}

/* --- Loading Indicator Consistency --- */
#loadingIndicator {
  margin-top: 5rem !important; /* Ensure it's visually centered */
  color: #0d6efd; /* Bootstrap primary blue */
}

#loadingIndicator .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

#loadingIndicator p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-top: 1rem;
}
