/* Custom styles for the header */
.custom-header {
    background: linear-gradient(to right, lightgray, lightblue);
    padding: 10px 0;
}
.custom-header .icon {
    font-size: 1.5rem;
    color: #333; /* Icon color */
    margin: 0 10px;
    cursor: pointer;
}
.custom-header .icon:hover {
    color: #007bff; /* Hover color */
}
.home-logo {
    width: 1.5rem;  /* Adjust this value to match the icon size */
    height: auto;   /* Keep aspect ratio of the logo */
}

/* Custom styles for the dal-cal PROFIL */
#wideModal .modal-dialog {
  max-width: calc(100% - 2cm); /* Modal takes up most of the width with 1 cm margin on each side */
  margin: 1cm; /* 1 cm margin from the edges of the screen */
}
.modal-header {
  margin-bottom: 0;
  padding-bottom: 0;
}
.modal-content {
  position: relative;
  overflow: visible;
}

/* Styling for the left panel */
.left-panel {
  background-color: #f0f0f0; /* Light grey background */
  padding: 1rem;
  border-right: 1px solid #ccc; /* Fine border separating the two panels */
}
.left-panel-link {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #000;
  font-weight: normal;
  border-radius: 4px;
  margin-bottom: 8px;
  transition: background-color 0.3s, color 0.3s; /* Smooth transition for hover and active states */
}
/* Hover effect: Lighter gray background with more transparency */
.left-panel-link:hover {
  background-color: rgba(211, 211, 211, 0.6); /* Lighter gray with transparency */
}
/* Active/Selected state: Transparent blue background */
.left-panel-link.active {
  background-color: rgba(0, 123, 255, 0.6); /* Semi-transparent blue */
  color: white;
}
/* Styling for the right panel */
.right-panel {
  padding: 1rem;
}

.info-container {
  display: flex;
  align-items: flex-start; /* Align items at the top */
  gap: 20px; /* Space between the sections */
  padding: 10px;
  /*border: 1px solid #ccc;
  border-radius: 8px;*/
}

.left-section {
  flex-shrink: 0; /* Prevent shrinking of the left section */
  text-align: center;
}

.left-section .person-icon i {
  font-size: 150px;
  margin-top: -30px;
  display: block;
}

.center-section {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center-align text vertically */
  gap: 10px; /* Space between name and function input */
}

.right-section {
  margin-left: auto; /* Push this section to the far right */
  text-align: left; /* Ensure text aligns properly */
}

.right-section ul {
  list-style-type: none; /* Remove bullet points */
  margin: 0;
  padding: 0;
}

.right-section li {
  margin-bottom: 8px;
}

/* Contextual menu styling */
.contextual-menu {
    position: absolute;
    display: none; /* Initially hidden */
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 9999; /* Ensure the menu appears on top */
    border-radius: 5px; /* Rounded corners for a polished look */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.contextual-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0; /* Remove any default margin */
}

.contextual-menu ul li {
    display: flex; /* Align icon and text horizontally */
    align-items: center; /* Center-align icon and text */
    margin: 5px 0; /* Spacing between items */
    padding: 5px; /* Add padding for better click area */
    border-radius: 4px; /* Rounded hover effect */
    transition: background-color 0.3s ease; /* Smooth hover transition */
}

.contextual-menu ul li:hover {
    background-color: #f0f0f0; /* Light gray background on hover */
}

.contextual-menu ul li a {
    display: inline-flex; /* Align icon and text in a row */
    align-items: center; /* Center icon and text vertically */
    text-decoration: none;
    color: black; /* Ensure consistent text color */
    flex: 1; /* Ensure link text stretches fully */
}

.contextual-menu ul li a:hover {
    color: black; /* Keep text black on hover */
}

/* Add a small icon next to the link */
.contextual-menu ul li .menu-icon {
    margin-right: 8px; /* Space between icon and text */
    font-size: 16px; /* Adjust icon size */
    color: #888; /* Neutral icon color */
    transition: color 0.3s ease; /* Smooth color change on hover */
}

.contextual-menu ul li:hover .menu-icon {
    color: #555; /* Slightly darker color on hover */
}

.discret {
    border: 1px solid transparent; /* Default transparent border */
    border-radius: 4px;
    padding: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    flex: 1; /* Allow input to expand to fill space */
    border-left: 4px solid #d6f0ff; /* Light blue border on the left */
}

/* Style for input elements when focused (clicked) */
.discret:focus {
    border-color: grey;  /* Grey border when focused */
    outline: none;  /* Remove default outline */
}

.user-level-badge {
    align-self: flex-start; /* Ensure the badge stays compact and aligned at the start */
    display: inline-block; /* Badge only wraps around its content */
    background-color: #007bff; /* Blue background */
    color: #fff; /* White text */
    font-size: 12px; /* Adjust font size */
    font-weight: bold; /* Make text bold */
    border-radius: 3px; /* Rounded corners */
    padding: 4px 8px; /* Padding inside the badge */
    margin-top: 8px; /* Space above the badge */
    white-space: nowrap; /* Prevent text from wrapping in the badge */
}

.profile-img {
    width: 100px; /* Adjust the size as needed */
    height: 100px; /* Keep the image square for consistent rounding */
    object-fit: cover; /* Ensures the image fits nicely inside the frame */
    border-radius: 15%; /* Adjust this value for different rounding (e.g., 50% for circular images) */
    border: 2px solid #ccc; /* Optional: Add a border for better visibility */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow */
}

/* Style for the expandable content */
.expandable-content {
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-top: 1rem;
    border: 1px solid #ddd;
}

/* Hide expandable content by default */
.d-none {
    display: none;
}

/* Ensure the button does not inherit link styles */
.toggle-btn {
    background: none;
    border: none;
    color: #007bff; /* Blue color for text */
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    text-decoration: none; /* Remove underlining */
    padding: 0; /* Remove padding from button */
}

/* Remove default link styles like the blue color and underline */
.toggle-btn:focus,
.toggle-btn:hover {
    color: #0056b3; /* Darker blue on hover */
    text-decoration: none; /* Prevent underline on hover */
}

/* Optional: Adjust icon color */
.toggle-btn i {
    margin-right: 5px;
}

/* Hover effect on the button */
.toggle-btn:hover {
    color: #0056b3; /* Darker blue when hovered */
}

/* Default style for all icons */
.navigation-icons .icon {
    font-size: 24px;
    color: grey; /* Inactive state is grey */
    transition: color 0.3s ease;
}

/* Active icons will have a blueish color */
.navigation-icons .icon.active {
    color: #007bff; /* Blueish color for active state */
}

/* Hover effect: green color for active icons */
.navigation-icons .icon.active:hover {
    color: #b01bcc; /* Green color when hovering over an active icon */
}

/* Hover effect for inactive icons */
.navigation-icons .icon:hover {
    color: #007bff; /* Blue color on hover for inactive icons */
}

/* When in striped rows, apply a background similar to the striped rows */
.table-striped tbody tr:nth-child(odd) .discret {
    background-color: #f2f2f2; /* Light grey, matching the striped row background */
}

td.task-id {
    display: flex;
    justify-content: center;  /* Horizontally center the content */
    align-items: center;      /* Vertically center the content */
    height: 100px;            /* Optional: Set the height of the cell */
}

input.form-control {
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

input.form-control:focus {
    border-color: #007bff; /* Change border color on focus */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Soft shadow effect on focus */
}

/* Style for the arrow */
.toggle-subtasks {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.3s ease-in-out; /* Smooth transition for rotation */
}

/* When the arrow is rotated (pointing down), show subtasks */
.toggle-subtasks.open {
    transform: rotate(90deg); /* Rotate to form the downward arrow */
}

/* Optional: Add some spacing or subtle effect for the task rows */
.task-row {
    padding-left: 10px;
    transition: all 0.3s ease-in-out;
}

/* Smoothly transition the visibility of subtasks */
.subtask-table {
    transition: max-height 0.5s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.subtask-table.show {
    max-height: 1000px; /* Allow the table to expand */
}

/* Optional: For task hover effect or focus */
.task-row:hover {
    background-color: #f8f9fa; /* Subtle hover effect */
}

.subtask-list,
.subtask-input-row {
    display: none;
}

.subtask-list.show,
.subtask-input-row.show {
    display: table-row; /* Or table-row-group depending on the layout */
}

/* CSS for showing and hiding elements */
.show {
    display: table-row;
}

.subtask-input-row,
.subtask-list {
    display: none; /* Hidden by default */
}

/* Apply styles to all <tr> elements whose ID starts with "task-" */
tr[id^="task-"] {
    height: auto; /* Let the row height adjust automatically */
}

tr[id^="task-"] td {
    padding: 8px 10px; /* Adjust padding to reduce row height */
    vertical-align: middle; /* Align content vertically to the center */
}

/* Optional: Adjust input fields and icons inside the row */
tr[id^="task-"] .form-control {
    height: auto; /* Let input fields have normal height */
    padding: 6px 8px; /* Reduce input padding */
}

tr[id^="task-"] .add-subtask-btn {
    font-size: 1rem; /* Reduce the size of the add button */
    padding: 0.3rem;
}

.task-days-left-red {
    font-size: 0.9rem;
    color: #ff5722; /* Example color for red */
    margin-top: 5px;
    display: flex;
    justify-content: flex-end; /* Align text to the right */
    align-items: flex-end; /* Align text to the bottom */
    height: 100%; /* Ensure it spans the height of the container */
    text-align: right; /* Just for extra text alignment within */
}

.task-days-left-green {
    font-size: 0.9rem;
    color: #1eb017; /* Example color for red */
    margin-top: 5px;
    display: flex;
    justify-content: flex-end; /* Align text to the right */
    align-items: flex-end; /* Align text to the bottom */
    height: 100%; /* Ensure it spans the height of the container */
    text-align: right; /* Just for extra text alignment within */
}

.user-context-menu {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999; /* Ensure it's above all other content */
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Hide by default */
    min-width: 350px;
    border-radius: 5px;
}

.user-context-menu p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

.dropdown-menu p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

/* Style for comment icon with a comment */
.comment-icon.commented {
    color: #007bff; /* Darker blue */
    text-shadow: 0 0 2px #0056b3, 0 0 5px #0056b3; /* Bold outline effect */
}

.user-placeholder-icon {
    cursor: pointer;
    color: #999;
    font-size: 1.2rem;
}

.user-menu-wrapper {
    position: relative;
}

.user-placeholder-icon:hover .user-menu-wrapper:hover .user-context-menu {
    display: block; /* Display the context menu on hover */
}

td {
    position: relative; /* Creates a positioning context */
    overflow: visible !important; /* Ensure that child elements overflow correctly */
}

table {
    position: relative;
    overflow: visible !important;  /* Allow the context menu to overflow the table */
}

/* Custom tooltip styling */
.user-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5em; /* Adjust size of the icon */
}

/* Tooltip appears on hover */
.user-icon:hover::after {
    content: attr(data-name); /* Use the name stored in the data-name attribute */
    position: absolute;
    bottom: 100%; /* Position the tooltip above the icon */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem; /* Customize font size */
    white-space: nowrap;
    z-index: 10;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s;
}

/* Tooltip hidden by default */
.user-icon::after {
    content: '';
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}

.assigned-users {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.extra-users-badge {
    font-size: 0.9em;
    background: #ccc;
    padding: 0.2em 0.5em;
    border-radius: 5px;
    cursor: pointer;
}

#task-comment-menu {
    width: 400px;
    height: 250px;
}

.status-dropdown {
    border: 1px solid transparent; /* Default transparent border */
    border-radius: 4px;
    padding: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    flex: 1; /* Allow input to expand to fill space */
    border-left: 4px solid #d6f0ff; /* Light blue border on the left */
}
.status-dropdown:focus {
    border-color: #007bff; /* Change border color on focus */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Soft shadow effect on focus */
}

.highlight-task {
    background-color: rgba(0, 123, 255, 0.1); /* Couleur de fond légère */
    border-left: 5px solid rgba(0, 123, 255, 0.8); /* Bordure pour accentuer */
    transition: all 0.3s ease-in-out;
}

.offcanvas-end {
    min-width: 33.33%; /* Set the width to a third of the page */
}

.task-icon {
    color: #0056b3; /* Blue */
    transition: color 0.3s ease; /* Smooth transition for color change */
}

.btn-outline-primary:hover .task-icon {
    color: white; /* White on hover */
}

.btn-outline-primary:hover {
    border-color: #0056b3;
}
