
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {


  .filters_checkbox[type="checkbox"] {
    width: 20px;
    height: 20px;
    background-color: #fff;
    position: relative;
  }

  .filters_checkbox[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #007BFF; /* Couleur de votre choix */
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
  }

  .filters_checkbox[type="checkbox"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
  }


  #bici-table {
    @apply w-full bg-white rounded-b-xl shadow-lg text-content;
  }

  .h-cell {
    @apply py-3 px-3 first:rounded-tl-xl last:rounded-tr-xl overflow-hidden sticky top-0 bg-secondary text-white font-bold !text-left;
  }

  .b-cell  {
    @apply py-3 first:pl-4 last:pr-4 !border-b !border-disable;
  }

  details > summary:not(#terms summary) {
    list-style: none !important;
  }

  details summary::-webkit-details-marker {
    display:none;
  }

  /* Chevron rotation for details/summary */
  details[open] .chevron-icon {
    transform: rotate(180deg);
  }

  body.wait, body.wait * {
    cursor: wait !important;
  }

  .form_with_checkbox {
    @apply relative inline-block text-transparent text-[0px] before:content-[''] before:mt-1 after:mt-1 before:block absolute before:cursor-pointer before:w-14 before:h-8 before:top-0 before:left-0 before:bg-disable before:rounded-full peer-checked:before:bg-secondary after:content-[''] after:block after:absolute after:cursor-pointer after:w-6 after:h-6 after:top-1 after:left-1 after:bg-white after:rounded-full peer-checked:after:ml-1 peer-checked:after:left-6 after:transition-all;
  }

  .btn {
    @apply px-4 py-2 font-normal text-center rounded-md border-2 shadow-md transition-colors cursor-pointer focus:outline-none focus:ring-2 focus:ring-opacity-75;
  }

  .btn-primary {
    @apply  text-white border-white hover:bg-white hover:text-primary hover:border-primary bg-primary focus:ring-secondary;
  }

  .btn-tertiary {
    @apply  text-white border-white hover:bg-white hover:text-tertiary hover:border-tertiary bg-tertiary focus:ring-secondary;
  }

  .btn-cancel {
    @apply text-white underline decoration-tertiary hover:text-secondary;
  }

  .btn-cancel-inverted {
    @apply underline decoration-tertiary text-primary hover:text-secondary;
  }

  .btn-wait {
    @apply   text-white cursor-not-allowed bg-content border-content;
  }

  /* =====================================================
     Boutons 2025 - Design minimaliste
     ===================================================== */

  /* Bouton principal - fond noir, sobre */
  .sf-btn {
    @apply inline-flex justify-center items-center px-5 py-2.5 text-sm font-medium rounded-md transition-all duration-200 ease-out cursor-pointer;
    @apply focus:outline-none focus:ring-2 focus:ring-offset-2;
  }

  .sf-btn-primary {
    @apply text-white bg-gray-900 border-0;
    @apply hover:bg-gray-800;
    @apply focus:ring-gray-500;
  }

  .sf-btn-primary:disabled {
    @apply bg-gray-400 cursor-not-allowed;
  }

  /* Bouton secondaire - contour sobre */
  .sf-btn-secondary {
    @apply text-gray-700 bg-transparent border border-gray-300;
    @apply hover:bg-gray-50 hover:border-gray-400;
    @apply focus:ring-gray-300;
  }

  .sf-btn-secondary:disabled {
    @apply text-gray-400 border-gray-200 cursor-not-allowed;
  }

  /* Bouton ghost - texte seul */
  .sf-btn-ghost {
    @apply text-gray-600 bg-transparent border-0;
    @apply hover:text-gray-900 hover:bg-gray-100;
    @apply focus:ring-gray-300;
  }

  /* Bouton danger */
  .sf-btn-danger {
    @apply text-white bg-red-600 border-0;
    @apply hover:bg-red-700;
    @apply focus:ring-red-500;
  }

  /* Tailles de boutons */
  .sf-btn-sm {
    @apply px-3 py-1.5 text-xs;
  }

  .sf-btn-lg {
    @apply px-6 py-3 text-base;
  }


  #dispatch-table {
    @apply w-full text-gray-600 bg-white rounded-xl shadow-lg;
  }
  #dispatch-table thead {
    @apply bg-secondary text-white font-bold !text-left;
  }
  #dispatch-table thead tr th {
    @apply overflow-hidden sticky top-0 px-3 py-3 first:rounded-tl-xl last:rounded-tr-xl;
  }

  #dispatch-table tbody {
    @apply font-normal bg-white text-content;
  }
  /* #dispatch-table tbody tr {
  } */

  #dispatch-table tbody tr {
    @apply  border-b border-light;
  }

  /* #dispatch-table tbody tr:nth-child(odd) td  {
    @apply px-3 py-3 text-center first:pl-4 last:pr-4;
  } */

  #dispatch-table tbody tr td  {
    @apply px-3 py-3 text-center first:pl-4 last:pr-4;
  }

  /* Styles pour la nouvelle page des archives */
  .delivery-archive-table {
    @apply overflow-hidden w-full bg-white rounded-xl shadow-lg;
  }

  .delivery-archive-table thead {
    @apply bg-gray-50 border-b border-gray-200;
  }

  .delivery-archive-table thead th {
    @apply px-4 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase;
  }

  .delivery-archive-table tbody {
    @apply bg-white divide-y divide-gray-200;
  }

  .delivery-archive-row {
    @apply transition-colors duration-150 cursor-pointer hover:bg-gray-50;
  }

  .status-badge {
    @apply inline-flex items-center px-2 py-1 text-xs font-medium rounded-full border;
  }

  .route-indicator {
    @apply flex items-center space-x-2 text-sm;
  }

  .route-dot {
    @apply w-2 h-2 rounded-full;
  }

  .route-line {
    @apply w-px h-6 bg-gray-300;
  }

  .metrics-grid {
    @apply grid grid-cols-1 gap-2 text-sm;
  }

  .metric-row {
    @apply flex justify-between items-center;
  }

  .action-button {
    @apply p-2 text-sm rounded-lg transition-colors;
  }

  .action-button:hover {
    @apply transform scale-105;
  }

  /* Mobile cards styling */
  .mobile-delivery-card {
    @apply p-4 bg-white rounded-lg border border-gray-200 transition-shadow hover:shadow-md;
  }

  .mobile-delivery-header {
    @apply flex justify-between items-start mb-3;
  }

  .mobile-delivery-route {
    @apply space-y-2 text-xs text-gray-500;
  }

  .mobile-delivery-actions {
    @apply flex justify-between items-center pt-3 mt-3 border-t border-gray-100;
  }


  .input-bici {
    @apply px-2 py-2 w-full text-base text-gray-800 bg-gray-50 rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .input-bici-nm {
    @apply w-full text-base text-gray-800 bg-white rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .select-bici {
    @apply px-2 py-2.5 w-full text-base font-medium text-gray-800 bg-white rounded-md border-none shadow-md placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .ts-wrapper.single .ts-control {
    appearance: none !important;
    background-color: #fff !important;
    background-image: none !important;
    color: rgb(31 41 55 / var(--tw-text-opacity));
    background-repeat: repeat-x !important;
    border-radius: 0.375rem !important;
    border-style: none !important;
    --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
  }
  .ts-wrapper.single .ts-control .item {
    font-weight: 500 !important;
    font-size: 1rem/* 16px */ !important;
    line-height: 1.5rem/* 24px */ !important;
  }

  /* ---- Tom Select for SimpleForm 2025 (underline style) ---- */
  /* Reset sf-input styles on ts-wrapper to avoid "input inside input" effect */
  .sf-field .ts-wrapper.sf-input {
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .sf-field .ts-wrapper.single .ts-control {
    background-color: #fff !important;
    border: none !important;
    border-bottom: 2px solid rgb(209 213 219) !important;
    border-radius: 0.375rem 0.375rem 0 0 !important;
    box-shadow: none !important;
    --tw-shadow: none !important;
    padding: 0.625rem 0.75rem !important;
  }

  .sf-field .ts-wrapper.single.focus .ts-control {
    border-bottom-color: rgb(17 24 39) !important;
  }

  .sf-field .ts-wrapper.single .ts-control .item {
    @apply text-base font-normal text-gray-900;
  }

  .sf-field .ts-wrapper .ts-dropdown {
    @apply mt-1 rounded-md border border-gray-200 shadow-lg;
  }

  .sf-field .ts-wrapper .ts-dropdown .option {
    @apply px-3 py-2 text-base text-gray-700;
  }

  .sf-field .ts-wrapper .ts-dropdown .option.active {
    @apply text-gray-900 bg-gray-100;
  }

  .input-bici-select-2 {
    @apply mt-2 w-full text-base text-gray-800 bg-white rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }
  .label-bici {
    @apply leading-8 text-content;
  }

  .page {
    @apply tracking-wide select-none text-secondary hover:text-tertiary;
  }
  .pagy_nav {
    @apply px-3 py-2 font-semibold rounded-full;
  }

  . {
    @apply cursor-not-allowed text-content hover:text-content;
  }
  aside, main {
    transition: width 300ms ease-in-out;
  }

  aside {
    transition: opacity 300ms ease-in-out;
  }

  .slide-in-left {
    animation: slide-in-left 150ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  }

  @keyframes slide-in-left {
    0% {
      transform: translateX(-300px);
      opacity: 0;
    }
    100% {
      transform: translateX(0);
      opacity: 1;
      display: block !important;
    }
  }

  .slide-out-left {
    animation: slide-out-left 150ms cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
  }

  @keyframes slide-out-left {
    0% {
      transform: translateX(0);
      opacity: 1;
    }
    100% {
      transform: translateX(-800px);
      opacity: 0;
      display: none !important;
    }
  }
  .noUi-handle {
    all: none !important;
    border-radius: 100% !important;
    width: 28px!important;
    height: 28px!important;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
    cursor: grab !important;
    font-size: .875rem;
  }

  .noUi-handle-upper::after, .noUi-handle-upper::before {
    display: none !important;
  }
  .noUi-handle-lower::after, .noUi-handle-lower::before {
    display: none !important;
  }

  .noUi-tooltip {
    @apply bg-transparent border-none text-tertiary;
  }

  .noUi-horizontal {
    @apply h-2;
  }

  .noUi-connect {
    @apply !bg-tertiary;
  }

  #informations {
    @apply text-blue-bici;
    table {
      @apply w-full;
      tbody {
        @apply w-full;
        tr {
          @apply flex justify-between items-center w-full;
          th {
            @apply w-1/4 text-left;
          }
          td {
            @apply flex-grow text-right;

          }
        }
      }
    }
  }
  .absolute-center {
    @apply absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2
  }

  .navbar-link {
    @apply
    overflow-hidden relative px-1 py-1 text-sm font-normal tracking-wider rounded-md hover:after:block after:-translate-x-36 hover:after:translate-x-0 hover:after:absolute hover:after:top-20 hover:after:lg:top-6 hover:after:xl:top-8 hover:after:-inset-1 hover:after:h-1 after:ease-in-out after:duration-500 hover:after:bg-tertiary after:transition-all sm:px-2 xl:text-lg hover:text-tertiary;
  }

  .pac-container:after {
    background-image: none !important;
    height: 0px !important;
    content:none !important;
    display:none !important;
  }

  .mapboxgl-ctrl-geocoder--input {
    @apply focus:ring focus:ring-2 focus:ring-blue-bici rounded-lg
  }

  .mapboxgl-ctrl-geocoder--input {
    outline: none !important;
  }

  .mapbox-search > div {
    @apply w-full input-bici
  }

  .suggestions {
    z-index: 2147483647 !important;
    opacity: 100% !important;
  }

  #result {
    z-index: 2147483647 !important;
  }

  #geocoder {
    z-index: 1;
    margin: 20px;
  }

  .mapboxgl-ctrl-geocoder {
    min-width: 100%;
  }

  a.mapboxgl-ctrl-logo {
    display: none !important;
  }

  .mapboxgl-ctrl-attrib.mapboxgl-compact {
    display: none !important;
  }

  .height-without-navbar {
    height: calc(100vh - theme('spacing.20'));
  }

  .min-height-without-navbar {
    min-height: calc(100vh - theme('spacing.36'));
  }

  .category-selector-tw {
    @apply absolute transform scale-0
  }

  body {
    @apply font-sans;
  }

  p {
    @apply pb-2 tracking-wider leading-loose text-white;
  }

  #terms p {
    @apply tracking-wider leading-5 text-justify text-white;
  }
/*
  h1 {
    @apply text-5xl text-white;
  } */

  #messenger h2 {
    @apply mb-6
    text-2xl inline-block text-primary relative
    before:z-[-1]
    before:absolute
    before:content-['']
    before:block
    before:w-full
    before:-rotate-2
    before:h-3
    before:-bottom-1
    before:bg-tertiary
    before:my-2
    before:mx-2;
  }

  #user h2 {
    @apply mb-6
    text-2xl inline-block text-primary relative
    before:z-[-1]
    before:absolute
    before:content-['']
    before:block
    before:w-full
    before:-rotate-2
    before:h-3
    before:-bottom-1
    before:bg-tertiary
    before:my-2
    before:mx-2;
  }

  h3 {
    @apply text-xl text-white;
  }

  h4 {
    @apply text-lg text-white;
  }

  .autocomplete {
    @apply inline-block relative;
  }

  /* // input[type=text] {
    //   @apply w-full bg-white
    // } */

  .autocomplete-items {
    @apply overflow-hidden absolute right-0 left-0 top-20 z-50 rounded-md border-x;
  }
  .autocomplete-items div {
    @apply px-3 py-2 bg-white border-b cursor-pointer hover:bg-gray-100;
  }
  .autocomplete-active {
    color: rgb(17 24 39);
    background-color: rgb(229 231 235) !important;
  }

  .flex-wrapper {
    display: flex;
    flex-flow: row nowrap;
  }

  .single-chart {
    width: 33%;
    justify-content: space-around ;
  }

  .circular-chart {
    display: block;
    margin: 10px auto;
    max-width: 80%;
    max-height: 250px;
  }

  .circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
  }

  .circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
  }

  @keyframes progress {
    0% {
      stroke-dasharray: 0 100;
    }
  }

  .circular-chart.orange .circle {
    /* stroke: #ff9f00; */
    @apply !stroke-tertiary;
  }


  .percentage {
    fill: rgb(248, 239, 239);
    font-family: sans-serif;
    font-size: 0.25em;
    text-anchor: middle;
  }
  .percentage-1 {
    @apply fill-tertiary text-[0.35em];
  }
  .align-svg {
    text-anchor: middle;
  }

  /* Floating Label CSS */
  .form-group {
    @apply relative mb-5 w-full;
  }

  .form-input {
    @apply block px-3 py-2 w-full placeholder-transparent rounded-md border border-gray-300 appearance-none focus:outline-none focus:ring-secondary focus:border-secondary;
    @apply transition-all duration-200;
    @apply z-40; /* Ajoutez cette ligne pour définir le z-index du champ de saisie */
  }

  .floating-label {
    @apply absolute left-0 top-2.5 px-3 py-0 transition-all duration-200 ease-in-out transform-gpu pointer-events-none text-content;
    @apply transform;
    @apply z-0; /* Modifiez cette ligne pour ajouter un z-index au label */
  }

  .form-input:focus ~ .floating-label,
  .form-input:not(:placeholder-shown) ~ .floating-label {
    @apply bg-white rounded-full border transform-gpu scale-75 -translate-y-6 text-secondary border-secondary;
  }

  .has-error .form-input {
    @apply border-red-500 focus:ring-red-500 focus:border-red-500;
  }

  .error {
    @apply mt-1 text-sm text-red-600;
  }

  .hint {
    @apply mt-1 text-sm text-content;
  }

  /* =====================================================
     SimpleForm 2025 - Modern Minimal Design
     Style: Underline inputs, labels above, neutral focus
     ===================================================== */

  /* Field wrapper */
  .sf-field {
    @apply mb-5;
  }

  /* Label - Static above input */
  .sf-label {
    @apply block mb-1.5 text-sm font-medium text-gray-600;
  }

  /* Base input styles - Underline only with white background */
  .sf-input {
    @apply block px-3 py-2.5 w-full text-base text-gray-900 bg-white border-0 border-b-2 border-gray-300 transition-colors duration-200 ease-out appearance-none;
    @apply placeholder-gray-400 rounded-t-md;
    @apply focus:outline-none focus:border-gray-900;
  }

  /* Select styling */
  select.sf-input {
    @apply pr-10 bg-no-repeat cursor-pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-size: 1.25em 1.25em;
  }

  select.sf-input:focus {
    @apply border-gray-900;
  }

  /* Textarea styling */
  textarea.sf-input {
    @apply border border-gray-300 rounded-md px-3 py-2 resize-y min-h-[100px];
    @apply focus:border-gray-900 focus:ring-1 focus:ring-gray-900;
  }

  /* Error state */
  .sf-field--error .sf-input {
    @apply border-red-500;
  }

  .sf-field--error .sf-input:focus {
    @apply border-red-500;
  }

  .sf-field--error .sf-label {
    @apply text-red-600;
  }

  .sf-error {
    @apply block mt-1.5 text-sm text-red-600;
  }

  /* Hint */
  .sf-hint {
    @apply mt-1.5 text-sm text-gray-500;
  }

  /* Error notification (form-level) */
  .sf-error-notification {
    @apply p-4 mb-6 text-sm text-red-700 bg-red-50 rounded-md border border-red-200;
  }

  /* Disabled state */
  .sf-input:disabled,
  .sf-input[readonly] {
    @apply text-gray-500 bg-gray-50 border-gray-200 border-dashed cursor-not-allowed;
  }

  /* ---- Boolean / Checkbox ---- */
  .sf-field--boolean {
    @apply mb-4;
  }

  .sf-boolean {
    @apply flex gap-3 items-center cursor-pointer select-none;
  }

  .sf-checkbox {
    @apply w-5 h-5 text-gray-900 bg-transparent rounded border-2 border-gray-400 transition-colors duration-150 cursor-pointer;
    @apply focus:ring-2 focus:ring-gray-300 focus:ring-offset-0;
    @apply checked:bg-gray-900 checked:border-gray-900;
    -webkit-appearance: none;
    appearance: none;
  }

  .sf-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  .sf-boolean-label {
    @apply text-base text-gray-700;
  }

  /* ---- Switch toggle ---- */
  .sf-field--switch {
    @apply mb-4;
  }

  .sf-switch-wrapper {
    @apply flex gap-3 items-center cursor-pointer select-none;
  }

  .sf-switch {
    @apply relative w-11 h-6 bg-gray-300 rounded-full transition-colors duration-200 ease-in-out cursor-pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .sf-switch::before {
    @apply absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow-sm transition-transform duration-200 ease-in-out;
    content: "";
  }

  .sf-switch:checked {
    @apply bg-gray-900;
  }

  .sf-switch:checked::before {
    transform: translateX(20px);
  }

  .sf-switch:focus {
    @apply ring-2 ring-gray-300 ring-offset-2 outline-none;
  }

  .sf-switch:disabled {
    @apply opacity-50 cursor-not-allowed;
  }

  .sf-switch-label {
    @apply text-base text-gray-700;
  }

  /* ---- Radio buttons ---- */
  .sf-field--radios {
    @apply mb-5;
  }

  /* Container for all radio options */
  .sf-field--radios > span.radio {
    @apply inline-flex mr-6 mb-2;
  }

  /* Label wrapping the radio input */
  .sf-field--radios span.radio label {
    @apply inline-flex gap-2 items-center text-base text-gray-700 cursor-pointer select-none;
  }

  /* Radio input styling */
  input.sf-radios[type="radio"] {
    @apply flex-shrink-0 w-5 h-5 bg-white border-2 border-gray-400 transition-colors duration-150 cursor-pointer;
    @apply focus:ring-2 focus:ring-gray-300 focus:ring-offset-0;
    @apply checked:border-gray-900;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
  }

  input.sf-radios[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23111827' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='4'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* ---- Checkboxes collection ---- */
  .sf-field--checkboxes {
    @apply mb-5;
  }

  /* Container for all checkbox options */
  .sf-field--checkboxes > span.checkbox {
    @apply inline-flex mr-6 mb-2;
  }

  /* Label wrapping the checkbox input */
  .sf-field--checkboxes span.checkbox label {
    @apply inline-flex gap-2 items-center text-base text-gray-700 cursor-pointer select-none;
  }

  /* Checkbox input styling in collections */
  input.sf-checkboxes[type="checkbox"] {
    @apply flex-shrink-0 w-5 h-5 bg-white rounded border-2 border-gray-400 transition-colors duration-150 cursor-pointer;
    @apply focus:ring-2 focus:ring-gray-300 focus:ring-offset-0;
    @apply checked:bg-gray-900 checked:border-gray-900;
    -webkit-appearance: none;
    appearance: none;
  }

  input.sf-checkboxes[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* Custom Switch CSS */
  .switch {
    @apply inline-flex relative justify-start items-center w-14 h-8 bg-gray-300 rounded-full transition-colors duration-200 ease-in-out cursor-pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 2px;
  }

  .switch:before {
    @apply block w-7 h-7 bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out;
    content: "";
    transform: translateX(0);
  }

  .switch:checked {
    @apply bg-secondary;
    background-image: none;
  }

  .switch:checked:before {
    transform: translateX(24px);
  }

  .switch:checked:hover,
  .switch:checked:focus {
    background-image: none;
  }

  .switch:focus {
    @apply ring-2 ring-offset-2 outline-none ring-secondary;
  }

  .switch:disabled {
    @apply opacity-50 cursor-not-allowed;
  }


  /* Custom hour button CSS */
  .btn-hour {
    @apply inline-flex relative justify-center items-center px-4 py-2 text-center rounded-md transition-colors duration-200 cursor-pointer bg-secondary;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .btn-hour:after {
    @apply block text-sm font-medium text-center text-white;
    content: "Personnaliser";
  }

  .btn-hour:checked {
    @apply bg-white border-2 border-secondary;
  }

  .btn-hour:checked:after {
    @apply text-secondary;
  }

  /* Bin for checkbox */
  .bin-box {
    @apply inline-block relative w-12 align-middle border-none cursor-pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .bin-box:after {
    @apply block absolute w-12 transition-transform duration-200 text-secondary;
    content: "\f1f8";
    font-family: "Font Awesome 6 Pro";
    display: inline-block;
    vertical-align: middle;
    font-weight:900;
  }

    /* fa warning */
    .warning {
      @apply absolute top-0 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .warning:after {
      @apply block text-base text-red-500 transition-transform duration-200;
      content: "\f071";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:900;
    }


    /* fa dropout */
    .dropout {
      @apply absolute top-1 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .dropout:after {
      @apply block text-base text-white transition-transform duration-200 rotate-90;
      content: "\f08b";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }


    /* fa hourglass */
    .hourglass {
      @apply absolute top-0.5 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .hourglass:after {
      @apply block text-base text-white transition-transform duration-200;
      content: "\f251";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }

    /* fa check */
    .check {
      @apply absolute top-0.5 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .check:after {
      @apply block text-base text-white transition-transform duration-200;
      content: "\f00c";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }

    /* registration switch */
    .switch-container {
      @apply flex justify-center items-center text-center;
    }

    .btn-switch {
      @apply flex relative justify-center items-center px-3 py-2 text-base font-medium text-center text-gray-600 bg-gray-100 rounded-full border border-gray-100 transition cursor-pointer hover:bg-blue-100;
    }

    input[type='radio']:checked + .btn-switch {
      @apply text-white border bg-secondary border-tertiary;
    }
}
/* 
 * Optimized Deliveries Archives Table Layout
 * Custom grid system with content-aware column sizing
 */

/* Table Header Grid Layout */
.deliveries-archive-table-header {
  display: grid;
  grid-template-columns: 
    minmax(80px, 10fr)   /* Livraison: Compact for ID + status */
    minmax(140px, 18fr)  /* Client & Date: Medium width */
    minmax(200px, 38fr)  /* Itinéraire: Largest for addresses */
    minmax(120px, 16fr)  /* Métriques: Medium for metrics */
    minmax(60px, 8fr)    /* Carnet: Small for icons */
    minmax(60px, 10fr);  /* Actions: Small for buttons */
  gap: 1rem;
  align-items: center;
}

/* Table Row Grid Layout - Matches header exactly */
.deliveries-archive-table-row {
  display: grid;
  grid-template-columns: 
    minmax(80px, 10fr)   /* Livraison */
    minmax(140px, 18fr)  /* Client & Date */
    minmax(200px, 38fr)  /* Itinéraire */
    minmax(120px, 16fr)  /* Métriques */
    minmax(60px, 8fr)    /* Carnet */
    minmax(60px, 10fr);  /* Actions */
  gap: 1rem;
  align-items: center;
}

/* Responsive behavior for smaller screens */
@media (max-width: 1280px) {
  .deliveries-archive-table-header,
  .deliveries-archive-table-row {
    grid-template-columns: 
      minmax(70px, 9fr)
      minmax(120px, 16fr)
      minmax(180px, 40fr)  /* Give more space to addresses on smaller screens */
      minmax(100px, 18fr)
      minmax(50px, 7fr)
      minmax(50px, 10fr);
    gap: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .deliveries-archive-table-header,
  .deliveries-archive-table-row {
    grid-template-columns: 
      minmax(60px, 8fr)
      minmax(100px, 15fr)
      minmax(160px, 42fr)  /* Maximum space for addresses */
      minmax(80px, 20fr)
      minmax(40px, 6fr)
      minmax(40px, 9fr);
    gap: 0.5rem;
  }
}

/* Enhanced column-specific styling */
.deliveries-archive-table-row > *:nth-child(1) {
  /* Livraison column - center everything */
  justify-self: center;
}

.deliveries-archive-table-row > *:nth-child(2) {
  /* Client & Date column - left align with smart truncation */
  justify-self: start;
  min-width: 0; /* Allow shrinking */
}

.deliveries-archive-table-row > *:nth-child(3) {
  /* Itinéraire column - left align with generous space */
  justify-self: start;
  min-width: 0; /* Allow shrinking */
}

.deliveries-archive-table-row > *:nth-child(4) {
  /* Métriques column - left align for inline labels */
  justify-self: start;
}

.deliveries-archive-table-row > *:nth-child(5) {
  /* Carnet column - center align */
  justify-self: center;
}

.deliveries-archive-table-row > *:nth-child(6) {
  /* Actions column - center align */
  justify-self: center;
}

/* Smart text truncation for address fields */
.deliveries-archive-table-row .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Improved hover effects */
.deliveries-archive-table-row:hover {
  background-color: rgb(239 246 255); /* bg-blue-50 */
}

/* Better spacing for route visualization */
.deliveries-archive-table-row .space-y-2 > * + * {
  margin-top: 0.5rem;
}

/* Metrics grid improvements */
.deliveries-archive-table-row .grid.grid-cols-1 {
  gap: 0.25rem;
}

/* Action buttons positioning */
.deliveries-archive-table-row .opacity-0.group-hover\:opacity-100 {
  transition: opacity 0.2s ease-in-out;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
