.picker__select--month,
.picker__select--year {
  font-size: 0.9rem !important;
}

/* General styles for all messages */
.nav-item .nav-link {
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #e0e0e0;
}

/* Unread message styles */
.nav-item .nav-link.message-unread {
  background-color: #f0f4f8;
  font-weight: bold;
}

.nav-item .nav-link.message-unread:hover {
  background-color: #e8eef5;
}

/* Read message styles */
.nav-item .nav-link.message-read {
  background-color: #ffffff;
  color: #666;
}

.nav-item .nav-link.message-read:hover {
  background-color: #f9f9f9;
}

/* Unread indicator */
.unread-indicator {
  color: #1a73e8;
  font-size: 24px;
  line-height: 1;
}

.badge-purple {
  background-color: #1d3573 !important;
}

.equal-width-buttons {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.equal-width-buttons .nav-item {
  width: 100%;
}

.equal-width-buttons .nav-link {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .equal-width-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .equal-width-buttons .nav-item {
    flex: 1 1 0;
    min-width: 200px; /* Adjust this value as needed */
  }
}

.media-container {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
}
table#twinning_volunteer_table th,
table#twinning_volunteer_table td {
  font-size: 0.8rem !important;
}
table#twinning_participant_table th,
table#twinning_participant_table td {
  font-size: 0.8rem !important;
}
/**
* FICHE DESCRIPTIVE
*/
.light-blue-bg {
  background-color: lightblue !important;
}
.full-info-cell {
  padding: 5px 2px !important;
  border: 1px solid lightblue !important;
  font-size: 0.8rem !important;
}
.modal-profile-image {
  max-height: 200px;
  width: auto;
}
.modal-info-row {
  margin-bottom: 10px;
}
.modal-info-label {
  font-weight: bold;
}
.modal-meeting-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.modal-meeting-cell {
  border: 1px solid #ddd;
  font-size: 0.7rem;
  padding: 5px;
  text-align: center;
}
.modal-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.modal-color-cell {
  border: 1px solid #ddd;
  font-size: 0.7rem;
  padding: 5px;
  text-align: center;
}
.modal-variable-width-bold {
  display: inline-block;
  font-weight: bold;
  font-size: 0.8rem;
  padding-right: 10px;
  margin: 0;
}
.modal-variable-width {
  display: inline-block;
  font-size: 0.8rem;
  padding-right: 10px;
}
/* New styles for compact table */
.modal-table-compact {
  margin-bottom: 0; /* Remove bottom margin */
}
.modal-table-compact td {
  padding: 0px 5px 0px 5px;
  vertical-align: top; /* Align content to top */
}
.modal-table-compact th {
  padding: 2px 5px 2px 5px;
  vertical-align: top; /* Align content to top */
}
.light-placeholder::placeholder {
  color: rgba(108, 117, 125, 0.5) !important;
  font-weight: 300 !important;
}

.viewThisTodo {
  cursor: pointer;
}
.viewThisTodo:hover {
  background: rgba(108, 117, 125, 0.1);
  border-radius: 6px;
}
.todoRead {
  text-decoration: line-through;
}
.todo-position-relative {
  overflow: hidden !important;
}

.todo-completed-flag {
  position: absolute;
  top: 20px;
  left: -35px;
  width: 130px;
  background-color: red;
  color: white;
  text-align: center;
  transform: rotate(-45deg);
  padding: 5px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1;
}
.table-responsive.min-height {
  min-height: 600px !important;
}
.btn.rounded-circle:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}
@media print {
  @page {
    size: auto;
    margin: 7mm;
    background-color: white;
  }

  body {
    margin: 0;
    padding: 0;
    background-color: white;
  }

  body * {
    visibility: hidden;
  }

  .modal,
  .modal * {
    visibility: visible;
  }

  .modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  .modal-dialog {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .modal-content {
    border: none;
    box-shadow: none;
  }

  .modal-header,
  .modal-footer {
    display: none;
  }

  .modal-body {
    padding: 0;
  }

  #participantModalContent {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .modal-table-compact {
    width: 100%;
    border-collapse: collapse;
  }

  .modal-table-compact td {
    padding: 0px 5px 0px 0px;
  }
  .modal-table-compact th {
    padding: 2px 5px 2px 5px;
  }

  .modal-profile-image {
    max-height: 200px;
    width: auto;
  }

  .modal-meeting-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
  }

  .modal-meeting-cell {
    border: 1px solid #ddd;
    padding: 2px;
    text-align: center;
    font-size: 0.8em;
  }

  .modal-color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
  }

  .modal-color-cell {
    border: 1px solid #ddd;
    padding: 2px;
    text-align: center;
    font-size: 0.8em;
  }

  .modal-variable-width-bold,
  .modal-variable-width,
  .modal-info-label {
    /* display: inline-block; */
    padding-right: 5px;
  }

  .modal-variable-width-bold {
    font-weight: bold;
  }
}
/* Ensure clear button (×) is visible and properly positioned */
.select2-container--default
  .select2-selection--single
  .select2-selection__clear {
  float: right !important;
  margin-right: 25px !important;
  color: #888 !important;
  font-weight: bold !important;
  font-size: 16px !important;
  opacity: 1 !important;
  display: inline-block !important;
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
  z-index: 100 !important;
}

/* Hover state for clear button */
.select2-container--default
  .select2-selection--single
  .select2-selection__clear:hover {
  color: #333 !important;
}

/* Ensure proper container height and padding */
.select2-container--default .select2-selection--single {
  min-height: 38px !important;
  padding-right: 40px !important; /* Make room for clear button */
}

/* Position the dropdown arrow */
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 100% !important;
  right: 5px !important;
}

/* Ensure text doesn't overlap with clear button */
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  padding-right: 40px !important;
}

/** 
 * Testing for responsive design
 */
/* Responsive sidebar navigation */
@media (max-width: 767.98px) {
  .member-profile-left-body {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1051 !important;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding-top: 60px; /* Add space for header */
  }

  .member-profile-left-body.show {
    left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  /* Form elements adjustments */
  .form-control,
  .form-select,
  select {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .card-body {
    padding: 0.75rem;
  }

  /* Give more room for form labels and inputs */
  .col-form-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
  }

  /* Adjust table responsive behavior */
  .table-responsive {
    border: none;
    margin-bottom: 1rem;
  }

  .table-responsive table {
    font-size: 0.875rem;
  }

  /* Fix checkbox alignment on mobile */
  .form-check-input {
    margin-top: 0.25rem;
  }

  /* Ensure the navigation tabs are vertically stacked */
  .equal-width-buttons {
    display: block !important;
  }

  .equal-width-buttons .nav-item {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }

  /* Mobile header with actions */
  .mobile-header-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    display: flex;
    justify-content: space-around;
  }

  /* Add padding to bottom of content to prevent overlap with fixed footer */
  .tab-content {
    padding-bottom: 60px;
  }

  /* Create sticky header for mobile */
  .mobile-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1052; /* Higher than sidebar */
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
}

/* Improving the mobile header toolbar */
.email-tools-box {
  cursor: pointer;
  /* padding: 0.5rem; */
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-tools-box:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Better mobile form layout */
@media (max-width: 575.98px) {
  .row.form-group > [class*='col-'] {
    margin-bottom: 1rem;
  }

  /* Improve select2 display on mobile */
  .select2-container {
    width: 100% !important;
  }
}

/* Select2 Mobile Optimizations */
@media (max-width: 767.98px) {
  /* Larger dropdown for better touch targets */
  .select2-dropdown-large .select2-results__option {
    padding: 12px !important;
    font-size: 16px !important;
  }

  /* Larger selection pills for easier removal */
  .select2-selection-large .select2-selection__choice {
    padding: 8px 12px !important;
    margin: 4px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
  }

  /* Taller select box for better touch interaction */
  .select2-container--bootstrap-5 .select2-selection {
    min-height: 48px !important;
  }

  /* Prevent iOS zoom on input fields */
  .select2-container--bootstrap-5 .select2-search__field {
    font-size: 16px !important;
  }

  /* Better padding for multi-select */
  .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__rendered {
    padding-bottom: 8px !important;
  }

  /* Ensure dropdown opens at full width */
  .select2-container {
    width: 100% !important;
  }

  /* Fix for dropdown position */
  .select2-container--open .select2-dropdown {
    left: 0 !important;
    max-width: 100%;
  }
}

/* Helper buttons for mobile view */
.btn-mobile-helper {
  padding: 8px 12px;
  margin: 5px 0;
  width: 100%;
}

/* Mobile bottom action bar */
.mobile-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1030;
}

.volunteer-work-btn {
  display: block;
  /* vertical-align: middle; */
  margin-top: -2px;
  float: right;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.volunteer-work-btn:hover {
  opacity: 1;
}

.form-check-label .volunteer-work-btn {
  display: none;
}

.form-check-label:hover .volunteer-work-btn {
  display: inline-block;
}

/* Bootstrap Dual Listbox Mobile Responsive Styles */
@media (max-width: 767.98px) {
  /* Stack dual listbox vertically on mobile */
  .bootstrap-duallistbox-container .box1,
  .bootstrap-duallistbox-container .box2 {
    width: 100% !important;
    margin-bottom: 15px !important;
    float: none !important;
  }
  
  /* Adjust buttons container for mobile */
  .bootstrap-duallistbox-container .buttons {
    width: 100% !important;
    margin: 15px 0 !important;
    text-align: center;
  }
  
  /* Make select boxes more touch-friendly */
  .bootstrap-duallistbox-container select {
    min-height: 200px !important;
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 8px !important;
  }
  
  /* Adjust move buttons for touch interaction */
  .bootstrap-duallistbox-container .btn {
    padding: 12px 16px !important;
    margin: 2px !important;
    font-size: 14px !important;
    min-width: 44px !important; /* Touch target size */
    min-height: 44px !important;
  }
  
  /* Make filter inputs more accessible */
  .bootstrap-duallistbox-container input[type="text"] {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
  }
  
  /* Adjust info text */
  .bootstrap-duallistbox-container .info {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
  
  /* Clear buttons positioning */
  .bootstrap-duallistbox-container .clear1,
  .bootstrap-duallistbox-container .clear2 {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }
  
  /* Ensure proper spacing between elements */
  .bootstrap-duallistbox-container .row {
    margin: 0 !important;
  }
  
  .bootstrap-duallistbox-container .col-md-6 {
    padding: 0 5px !important;
  }
}

/* Fix DataTables pagination buttons text wrapping */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
  min-width: 2.5rem;
  width: auto !important;
  white-space: nowrap;
  padding: 0 1rem;
}