/* Basic resets */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  /* Évite le scroll horizontal parasite */
  overflow-x: hidden;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* Global background */
body {
  background: url('../bg.webp') no-repeat center center fixed;
  background-size: cover;
}

/* Sur mobile, le background-attachment: fixed peut parfois causer des soucis de performance,
   on le désactive donc sur les écrans <= 768px */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  .m-5 {
    margin: 1rem !important;
  }
  /* On réduit aussi le padding .px-5 sur les petits écrans */
  .px-5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

.dashboard-default {
  padding: 0 15px;
}

/* Override pour éviter que h1 et h4 ne soient transformés en majuscules */
h1.f-w-900, h4 {
  text-transform: none !important;
}

/* Espacement entre les champs du formulaire dans le premier card-body */
.tracking-form-col {
  margin-bottom: 1rem;
}

/* Ajout d’une marge supérieure pour le bouton "Track container" */
#track_shipment {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
}

/* Pagination buttons styling */
#pagination_buttons button,
#companiesPaginationButtons button {
  flex: 1;
  min-width: 40px;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  text-align: center;
}
#pagination_buttons span {
  margin: 0 10px;
  font-size: 0.85rem;
}

/* Container for pagination controls */
#pagination_controls {
  margin-top: 20px;
  padding: 10px;
  background-color: transparent;
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

/* Action buttons in "My latest tracks" */
.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}
.delete-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}
.tracking-id-cell {
  cursor: pointer;
  text-decoration: underline;
  color: #007bff;
}

/* Bouton regroupé (☰) – doit avoir la même hauteur que "Track container" */
button.menu_action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  width: 50px;
  height: 2.5rem;
}

/* Pour que les modales n'occupent pas toute la largeur sur mobile */
@media (max-width: 576px) {
  .modal-dialog {
    max-width: 90% !important;
    margin: 1.75rem auto;
  }
}

/* Footer styles */
footer {
  background-color: rgba(34, 34, 34, 0.95);
  color: #ccc;
  padding: 1rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid #444;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2rem;
}
footer .footer-links {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
}
footer a {
  color: #ccc;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* Style amélioré pour les options de langue dans la modal */
.language-option {
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  color: #000;
  border: 1px solid transparent;
}
.language-option:hover {
  background-color: #f0f0f0;
}
.language-option.selected {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

/* (Optionnel) Évite le "saut" horizontal lors de l’ouverture d’une modale Bootstrap */
body.modal-open {
  padding-right: 0 !important;
}
