/* Switch Button */
.onoffswitch {
    position: relative; width: 65px;
    -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.onoffswitch-label {
    display: block; overflow: hidden; cursor: pointer;
    border: 2px solid #C2BEBE; border-radius: 20px;
}
.onoffswitch-inner {
    display: block; width: 200%; margin-left: -100%;
    transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
    display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
    font-size: 14px; color: white; font-family: 'HelveticaNeueLTPro', 'Helvetica Neue', 'Helvetica', Trebuchet, Arial, sans-serif; font-weight: bold;
    box-sizing: border-box;
}
.onoffswitch-inner:before {
    content: "Oui";
    padding-left: 10px;
    background-color: #2A62FA; color: #FFFFFF;
}
.onoffswitch-inner:after {
    content: "Non";
    padding-right: 10px;
    background-color: #CC0624; color: #FFFFFF;
    text-align: right;
}
.onoffswitch-switch {
    display: block; width: 18px; margin: 6px;
    background: #FFFFFF;
    position: absolute; top: 0; bottom: 0;
    right: 36px;
    border: 2px solid #C2BEBE; border-radius: 20px;
    transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
    right: 0px;
}

body {font-family: 'HelveticaNeueLTPro', 'Helvetica Neue', 'Helvetica', Arial, Helvetica, sans-serif;}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Upload Button */
.button__upload {
  border: none;
  background: #999999;
  color: #ffffff;
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
  font-family: 'HelveticaNeueLTPro', 'Helvetica Neue', 'Helvetica', sans-serif;
  overflow: hidden;
  border-radius: 5px;
  min-width: 125px;
}

.button__progress {
  position: absolute;
  height: 100%;
  width: 0%;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.2);
  transition: width 0.3s;
}

.button__text {
  position: relative;
}

/* Loader */
.loader {
  width: 24px;
  height: 24px;
  border: 2px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
.loader::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid;
  border-color: #FF3D00 transparent;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Carousel (#carousel - image viewer in demand detail) */
#carousel {
  position: relative;
  padding-top: 30px;
  height: 200px;
  top: 50%;
  transform: translateY(-10%);
  overflow: hidden;
}
#carousel div {
  position: absolute;
  transition: transform 400ms, left 400ms, opacity 400ms, z-index 0s;
  opacity: 1;
}
#carousel div img {
  width: 200px;
  transition: width 400ms;
   -webkit-user-drag: none;
   box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
   border-radius: 10px;
}
#carousel div.hideLeft {
  left: 0%;
  opacity: 0;
  transform: translateY(90%) translateX(-50%);
}
#carousel div.hideLeft img {
  width: 100px;
}
#carousel div.hideRight {
  left: 100%;
  opacity: 0;
  transform: translateY(90%) translateX(-50%);
}
#carousel div.hideRight img {
  width: 100px;
}
#carousel div.prev {
  z-index: 2.5;
  left: 30%;
  transform: translateY(25px) translateX(-50%);
}
#carousel div.prev img {
  width: 150px;
}
#carousel div.prevLeftSecond {
  z-index: 2;
  left: 15%;
  transform: translateY(70%) translateX(-50%);
  opacity: 0.7;
}
#carousel div.prevLeftSecond img {
  width: 100px;
}
#carousel div.selected {
  z-index: 5;
  left: 50%;
  transform: translateY(0px) translateX(-50%);
}
#carousel div.next {
  z-index: 2.5;
  left: 70%;
  transform: translateY(25px) translateX(-50%);
}
#carousel div.next img {
  width: 150px;
}
#carousel div.nextRightSecond {
  z-index: 2;
  left: 85%;
  transform: translateY(70%) translateX(-50%);
  opacity: 0.7;
}
#carousel div.nextRightSecond img {
  width: 100px;
}

/* Card list grid */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 10px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Status and price badges */
.status {
  font-weight: bold;
  color: #444;
}

.status img {
  height: 22px;
  width: 44px;
}

.price {
  font-size: 1.1em;
  font-weight: bold;
  color: #d5001c;
}

/* Carousel (class-based, for modal image strips) */
.carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.carousel img {
    flex-shrink: 0;
    width: auto;
    height: 150px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Action buttons */
.edit-btn {
    background: #B2BAC0;
    color: #eee;
    padding: 5px 20px;
    margin-bottom: 5px;
    border: none;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: normal;
    height: 35px;
    width: 150px;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-btn:hover {
    background: #379683;
}

.close-btn {
    background: #d5001c;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #c82333;
}

/* Active menu item highlight */
.first {
    background-color: #d5001c;
    font-weight: bold;
    color: #eee;
    border-radius: 8px;
    padding: 5px 10px;
    line-height: 1.5;
    display: inline-block;
    text-align: center;
}

/* Vehicle cards */
.vehicle-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    max-width: 300px;
    height: 405px;
    background-color: #fff;
}

.vehicle-card h3 {
  font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
  padding-top: 10px;
  padding-right: 5px;
  margin-left: -5px;
  margin-right: 5px;
  margin-bottom: 10px;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  color: #333;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.vehicle-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-card-details {
    padding: 5px;
    padding-bottom: 5px;
    font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
}

.vehicle-footer {
  font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
}

.view-details-btn {
  font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
}

/* Modal card body (carousel navigation) */
.modal-card-body {
  position: relative;
}

.modal-card-body > div {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
}

.modal-card-body > div:first-child {
    left: 10px;
}

.modal-card-body > div:last-child {
    right: 10px;
}

/* Vehicle detail modal category sections */
.modal-vehicle-card-category {
  font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
  font-size: 1em;
  margin-bottom: 20px;
}

.modal-vehicle-card-category h3 {
  background: #B5B3BA;
  font-family: "HelveticaNeueLTPro", "Helvetica Neue", Helvetica, Arial;
  font-weight: bold;
  padding-top: 10px;
  padding-left: 30px;
  padding-right: 10px;
  margin-left: -5px;
  margin-right: 5px;
  margin-bottom: 10px;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  color: #333;
  position: relative;
}

.modal-vehicle-card-category h3::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-image: url('../img/puce_arrow.png');
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

/* Vehicle detail modal */
.modal-vehicle {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-vehicle.active {
  display: flex;
}

.modal-vehicle-card {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-vehicle-card-header {
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  color: #555555;
  padding: 20px;
  font-family: 'HelveticaNeueLTPro', 'Helvetica Neue', 'Helvetica', Trebuchet, Arial;
  font-weight: bold;
  font-size: 1.5em;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
}

.modal-vehicle-card-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-vehicle-card-footer {
    padding: 10px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
}

/* Dealer modal */
.modal-dealer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-dealer.active {
  display: flex;
}

.modal-dealer-body {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    padding-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-dealer-header {
  background: #f9f9f9;
  color: #d5001c;
  padding: 20px;
  font-family: 'HelveticaNeueLTPro', 'Helvetica Neue', 'Helvetica', Trebuchet, Arial;
  font-weight: bold;
  font-size: 1.5em;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
}

.modal-dealer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-dealer-footer {
  padding: 10px;
  background: #f5f5f5;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
}

/* Drop down lists */
.dropdown {
    position: relative;
    width: 250px;
}

#searchInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1;
}

.dropdown-item {
    padding: 10px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}
