/* src/assets/pending-submissions.css */

/* --- General Layout & Responsiveness (Consistent Across Admin Pages) --- */
#wrapper {
  display: flex; /* Make the wrapper a flex container */
  min-height: 100vh; /* Ensure it takes full viewport height */
  padding-top: 56px; /* Space for the fixed navbar */
}

#sidebar-wrapper {
  width: 250px; /* Fixed width for the sidebar */
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  background-color: #f8f9fa; /* Light background for sidebar */
}

#page-content-wrapper {
  flex-grow: 1; /* Allow main content to grow and fill available space */
  background-color: #ffffff; /* A consistent, slightly cooler light gray background */
  padding: 1.5rem; /* Consistent padding around the content */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Ensure the main content is visible once loaded (for development) */
#mainContent {
  display: block !important; /* Override d-none for demonstration */
}

/* Headings and Horizontal Rule consistency */
h1 {
  color: #343a40; /* Darker text for main headings */
  font-weight: 700; /* Bolder headings */
  margin-bottom: 1.5rem; /* Consistent spacing below headings */
}

hr {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* --- Card Base Styling Consistency --- */
.card {
  border-radius: 0.75rem; /* Rounded corners */
  border: 1px solid #e9ecef; /* Light gray border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
  overflow: hidden; /* Ensures header and body corners are rounded properly */
  transition: all 0.2s ease-in-out; /* Smooth transition for hover effects */
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Slightly more prominent shadow on hover */
}

/* Card Header Styling */
.card-header {
  color: #ffffff; /* White text for headers */
  padding: 1.25rem 1.5rem; /* Ample padding */
  border-bottom: 1px solid rgba(0, 0, 0, 0.125); /* Subtle separator */
  display: flex;
  align-items: center; /* Align icon and title vertically */
  font-weight: 600; /* Bolder header text */
}

.card-header h5 {
  margin-bottom: 0;
  font-weight: 600;
}

/* Specific Card Header Gradients */
.card-header.bg-info {
  background: linear-gradient(
    135deg,
    #17a2b8,
    #138496
  ) !important; /* Teal/cyan gradient */
}

/* Card Body Styling */
.card-body {
  background-color: #ffffff; /* White background for card content */
  padding: 1.5rem; /* Consistent padding */
}

/* --- Specific styles for pending submissions list --- */
#taskSubmissionsList .list-group-item {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  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;
}

#taskSubmissionsList .list-group-item:hover {
  background-color: #f5f8fc; /* Light blueish-gray on hover */
  transform: translateY(-3px);
  box-shadow: 0 4gpx 10px rgba(0, 0, 0, 0.08);
}

#taskSubmissionsList .list-group-item .submission-details {
  flex-grow: 1; /* Allow details to take available space */
  margin-right: 15px; /* Space between details and actions */
}

#taskSubmissionsList .list-group-item .submission-actions {
  display: flex;
  gap: 10px;
  margin-top: 0; /* Reset margin for larger screens */
  flex-shrink: 0; /* Prevent buttons from shrinking */
}

.submission-status-badge {
  font-size: 0.9em;
  padding: 0.4em 0.8em;
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Filter dropdowns styling */
.filter-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
}

/* Form controls consistency */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Buttons consistency */
.btn-success {
  background-color: #28a745;
  border-color: #28a745;
}
.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.3rem;
}
.btn-outline-info {
  color: #17a2b8;
  border-color: #17a2b8;
}
.btn-outline-info:hover {
  background-color: #17a2b8;
  color: #fff;
}

/* Submission details link */
.submission-details a.btn-outline-info {
  border-radius: 0.5rem;
  font-weight: 500;
  color: #17a2b8; /* Match Bootstrap info color */
  border-color: #17a2b8;
  transition: all 0.3s ease;
}
.submission-details a.btn-outline-info:hover {
  background-color: #17a2b8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(23, 162, 184, 0.2);
}

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

/* --- Responsive Adjustments --- */
@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; /* Smaller padding on mobile */
    padding-right: 1rem; /* Smaller padding on mobile */
    padding-top: calc(
      56px + 1rem
    ); /* Adjust for fixed navbar height + smaller padding */
  }

  /* Make filter dropdowns stack vertically on small screens */
  .row.mb-3 > div[class*="col-"] {
    width: 100%;
    margin-bottom: 1rem;
  }

  #taskSubmissionsList .list-group-item .submission-actions {
    width: 100%; /* Make buttons take full width and stack */
    justify-content: stretch; /* Stretch buttons to fill width */
    margin-top: 15px; /* Space from details above when wrapped */
  }

  #taskSubmissionsList .list-group-item .submission-actions .btn {
    flex-grow: 1; /* Allow buttons to grow equally */
  }
}

/* --- 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;
}

/* Custom Primary Color for Navbar */
.bg-custom-primary {
  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; /* 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; /* Slightly darker hover for light background */
}
