/* project_planning_saas/static/css/styles.css */

.task-node {
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #f9f9f9;
  cursor: pointer;
}

#flowchart-container {
  /* Add styles for the container if needed */
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.btn-warning {
  color: #fff;
  background-color: #ff9800;
  border-color: #ff9800;
}

.btn-danger {
  color: #fff;
  background-color: #f44336;
  border-color: #f44336;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px; /* Default width */
  min-height: 100vh;
  overflow-y: auto;
  background-color: #673ab7;
  transition: width 0.3s; /* Smooth transition */
  z-index: 1001;
  color: #fff; /* Default text color for sidebar */
}

#sidebar h4 { /* Increased specificity */
  color: #fff !important; /* Force white */
  padding: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#sidebar .nav-link { /* Increased specificity */
  color: rgba(255, 255, 255, 0.8) !important; /* Force slightly transparent white */
  padding: 0.75rem 1rem;
}

#sidebar .nav-link:hover, /* Increased specificity */
#sidebar .nav-link.active { /* Increased specificity */
  color: #fff !important; /* Force full white */
  background-color: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link i { /* Increased specificity */
  margin-right: 0.75rem;
  width: 1.2em;
  text-align: center;
  color: inherit !important; /* Ensure icon inherits the link's white color */
}

.sidebar .mt-auto { /* Style the bottom user section */
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Separator above */
  padding-top: 1rem !important; /* Add padding above */
}

#sidebar .text-muted, /* Increased specificity */
#sidebar .text-muted span, /* Increased specificity */
#sidebar .text-muted i { /* Target icon in muted text too */
  color: rgba(255, 255, 255, 0.7) !important; /* Force lighter white */
}

html.sidebar-collapsed .sidebar {
  width: 80px; /* Collapsed width */
}

html.sidebar-collapsed .sidebar .nav-link span {
  display: none; /* Hide text in collapsed state */
}

html.sidebar-collapsed .sidebar h4 {
  /* Keep h4 visible but style for collapsed state */
  font-size: 0.8rem; /* Make it smaller */
  text-align: center; /* Center it */
  padding: 0.5rem 0; /* Add some padding */
  margin-bottom: 0.5rem; /* Add some margin */
  white-space: nowrap; /* Prevent wrapping */
  overflow: hidden; /* Hide overflow */
  text-overflow: ellipsis; /* Add ellipsis if too long */
  display: block; /* Ensure it takes block space */
  /* color: #fff; <-- Already handled by .sidebar h4 rule */
}

html.sidebar-collapsed .sidebar .nav-link {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: center; /* Center align icons */
}

html.sidebar-collapsed .sidebar .nav-link i {
  margin-right: 0; /* Remove margin for icons */
  font-size: 1.2rem; /* Adjust icon size if needed */
}

html.sidebar-collapsed .main-content {
    margin-left: 80px;
}

html.sidebar-collapsed .top-nav {
    left: 80px; /* Adjust left position for collapsed sidebar */
}

.top-nav {
  position: fixed;
  top: 0;
  left: 250px; /* Set left position matching expanded sidebar width */
  right: 0;
  height: 60px;
  background-color: #ffffff;
  color: #000;
  display: flex;
  align-items: center;
  padding: 0 20px; /* Restore original padding */
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: left 0.3s; /* Transition the left property */
  /* box-sizing: border-box; <-- Remove this */
}

.top-nav h1 {
  margin: 0;
  font-size: 2.0rem !important;
  font-family: 'Caveat', cursive !important;
  font-weight: bold !important;
  background: linear-gradient(to right, #30CFD0, #330867) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2) !important;
}

.top-nav h1 a {
  text-decoration: none !important;
}

.top-nav h1 a:hover {
  text-decoration: none !important;
}

.main-content {
  margin-top: 60px;
  margin-left: 250px;
  padding: 20px;
  transition: margin-left 0.3s;
}

.main-content.collapsed {
  margin-left: 60px;
}

.right-panel {
  position: fixed;
  top: 60px;
  right: 0;
  width: 350px;
  height: calc(100% - 60px);
  background-color: #f8f9fa;
  border-left: 1px solid #ccc;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: -5px 0px 10px rgba(0, 0, 0, 0.1);
}

.right-panel.open {
  transform: translateX(0);
}

.btn-maximize {
  float: right;
  background-color: #6c757d;
  color: #fff;
  border: none;
  border-radius: 0.2rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-maximize:hover {
  background-color: #5a6268;
}

#sidebarToggle {
  /* Default (Expanded) State */
  margin-bottom: 1rem; /* Add some space below */
  display: block; /* Make it block level */
  width: 100%; /* Full width of expanded sidebar */
  text-align: left; /* Align icon/text left */
  padding: 0.5rem 1rem; /* Adjust padding */
  border-radius: 0; /* Remove default radius */
  border: none; /* Remove border */
  background-color: rgba(255, 255, 255, 0.1); /* Subtle background */
  color: #fff; /* White icon */
}

#sidebarToggle:hover {
  background-color: rgba(255, 255, 255, 0.2); /* Slightly lighter on hover */
}

html.sidebar-collapsed .sidebar #sidebarToggle {
  /* Collapsed State */
  width: 80px; /* Match collapsed sidebar width */
  margin-right: 0; /* Remove margin */
  text-align: center; /* Center icon */
  padding: 0.5rem 0; /* Adjust padding */
  box-sizing: border-box; /* Ensure padding is included within the 80px width */
}

html.sidebar-collapsed .sidebar #sidebarToggle i {
  /* Increase icon size in collapsed state */
  font-size: 1.8rem; /* Adjust as needed */
}


/* Subtask List Styling */
.subtask-list {
  list-style-type: none; /* Remove default bullets */
  padding-left: 0; /* Remove default padding */
}

.subtask-list li {
  margin-bottom: 5px; /* Add some space between items */
}

.subtask-list input[type="checkbox"] {
  margin-right: 8px; /* Space between checkbox and text */
  cursor: pointer;
  /* Basic appearance enhancement */
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle; /* Align checkbox nicely with text */
}

/* Style for the 'No subtasks yet' message */
.subtask-list li:only-child {
    color: #6c757d; /* Use a muted color for the message */
    font-style: italic;
}

/* Ensure readable text color for status badges */
.badge.bg-blocked,
.badge.bg-in-progress,
.badge.bg-done,
.badge.bg-ready {
    color: #212529; /* Use a dark color for better contrast */
}

/* Add these rules for status badge backgrounds */
.badge.bg-blocked { background-color: #dc3545 !important; color: white !important; } /* Red */
.badge.bg-ready { background-color: #ffc107 !important; color: black !important; } /* Yellow */
.badge.bg-in-progress { background-color: #0d6efd !important; color: white !important; } /* Blue */
.badge.bg-done { background-color: #198754 !important; color: white !important; } /* Green */