/* --------------------------------------------------
   Basic Layout Tweaks (Bootstrap-friendly)
-------------------------------------------------- */

body {
    background: #f5f5f8;
}

.top_80 {
  top:88px!important;
}


/* --- NORMAL VIEW --- */
#carouselExampleIndicators {
  width: 100%;
  position: relative;
}


.carousel-item {
  width: 100%;
  aspect-ratio: 14 / 9;
  overflow: hidden;
}

.fullscreen .carousel-item {
  aspect-ratio: 16 / 9;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* --- THUMBNAILS --- */
.carousel-thumbnails {
  display: flex;
  flex-wrap: nowrap; /* keine Umbrüche */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  gap: 4px;
  z-index: 2;
}

.carousel-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.carousel-thumbnails .img-thumbnail {
  padding: 0;
  flex: 0 0 auto; /* verhindert Umbrechen */
}

/* Fullscreen Button */
.makefullscreen {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  font-size: 20px;
  z-index: 3;
}

.carousel-thumbnails .thumbnail {
  width:60px;
  height:40px;
  object-fit:cover;
  cursor:pointer;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: .25rem;
  max-width: 100%;
  padding: 0;
  flex: 0 0 auto;
  filter: grayscale(1);
  transition: 0.3s;

}

.carousel-thumbnails .thumbnail:hover,
.carousel-thumbnails .thumbnail.thumb-active {
  filter: grayscale(0);
  border-color: #dc3545 !important;
}
#carouselExampleIndicators.fullscreen .carousel-item img {
  object-fit: contain;
}
#carouselExampleIndicators.fullscreen .carousel-item img.horizontal {
  object-fit: cover;
}

@media (max-width: 768px) {
  #carouselExampleIndicators {
    border-radius: 0;
    width: calc(100% + 1.5rem);
    margin-top: -1rem;
    margin-left: -.75rem;
    margin-right: -.75rem;
  }
}







.thumb-wrapper {
    overflow: hidden;
    border-radius: .35rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    position: relative;
    height: 100%;
    aspect-ratio: 14 / 9;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*max-height: 110px;*/
}

.thumb-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 3px 6px;
    font-size: 12px;
}







/* LIST VIEW */
/* --- GRID VIEW (Standard) --- */
#vehicleContainer .vehicle_card img.card-img-top {
    height: 180px;
    object-fit: cover;
}
.list-view .vehicle_card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.list-view .vehicle_card .card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100%;
}

.list-view .vehicle_card .card > .position-relative {
    display: flex;
    align-items: stretch;
    height: auto;
    width: 150px;
}

.list-view .vehicle_card img.card-img-top {
    width: 150px !important;
    height: 100% !important;
    object-fit: cover;
    flex-grow: 1;

    max-height: 180px !important; /* HIER MUSS NOCH WAS GEÄNDERT WERDEN, DAMIT DIE HÖHE SICH AN DER CARD AUSRICHTET UDN MAXIMAL SO HOCH IST WIE DIE CARD! */
}

.list-view .card-body {
    padding: 10px 15px !important;
    min-width: 0;
}

@media (min-width: 1200px) {
    .list-view .vehicle_card {
        max-width: 50% !important;
    }
}

@media (max-width: 768px) {
    .list-view .vehicle_card .card > .position-relative {
        width: 150px;
    }
}

@media (max-width: 500px) {
    .list-view .vehicle_card .card > .position-relative {
        width: 110px;
    }
    .list-view .vehicle_card img.card-img-top {
        width: 110px !important;
    }
}




















@media (min-width: 1600px) {
  .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 1520px;
  }
}

/*
@media (min-width: 2000px) {
  .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 1700px;
  }
}
*/

#favoritenliste img {
  transform: scale(1.1);
}

.offcanvas-backdrop.show,
.modal-backdrop.show {

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;

  opacity: 1;
  background:rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}


@keyframes redPulse {
  0% {
    box-shadow: 0 0 0 0 #dc354580;
  }
  70% {
    box-shadow: 0 0 0 14px #dc354500;
  }
  100% {
    box-shadow: 0 0 0 0 #dc354500);
  }
}
@keyframes greenPulse {
  0% {
    box-shadow: 0 0 0 0 #19875480;
  }
  70% {
    box-shadow: 0 0 0 14px #19875400;
  }
  100% {
    box-shadow: 0 0 0 0 #19875400);
  }
}

.pulsebtn {
  transition: transform 0.3s ease;
  animation: redPulse 1.8s infinite;
}

.pulsebtn_green {
  transition: transform 0.3s ease;
  animation: greenPulse 1.8s infinite;
}
.vehicle_card.sold {
  opacity:0.5;
}





/* Entfernen-Button */
.removeFav {
    margin-left: 10px;
}
.addFav i {
    transition: transform 0.2s ease;
}

.addFav.btn-danger i {
    transform: scale(1.3);
}

.addFav {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
}




/* Boxed content container */
.box {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.one-row-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* KPI items (Dashboard cards) */
.kitems {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kitem {
    background: #f0f0f5;
    padding: 10px;
    border-radius: 6px;
    min-width: 150px;
}

.bg-black {
  background: #101010;
}
#mainHeader {
    z-index: 1050;
    box-shadow: 0 0 20px rgba(0,0,0,.5) !important;
}

/* Still needed because Bootstrap does not auto-wrap tables on mobile */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Make table cells compact on small screens */
td, th {
    white-space: nowrap;
}

/* Optional row highlighting for sold/unsold */
tr.unsold {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr.sold {
    background-color: #e6ffe6;
    color: #666;
}

/* Cost table (if you still use it in details view) */
table.costs th,
table.costs td {
    padding: 6px 10px;
    border: 1px solid #ccc;
}

table.costs tr:hover {
    background-color: #f9f9f9;
}

/* Responsive header (kept for sections) */
.responsive-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.responsive-header h2 {
    flex: 1 1 auto;
}

/* Form input spacing */
form input,
form select,
form button,
form textarea {
    margin-bottom: 12px;
}

/* Typography tweaks */
.user {
    font-size: 0.9rem;
}

.hint {
    font-size: 0.85rem;
    color: #666;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    td, th {
        padding: 6px;
    }
    h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    td, th {
        padding: 4px;
        font-size: 0.85rem;
    }
    h2 {
        font-size: 1.2rem;
    }
}



/* Light global background */
body {
    background: #f5f5f8;
}

/* Card spacing tweaks */
.card h6 {
    margin-bottom: 6px;
}

/* Vehicle row coloring */
.table-warning {
    background-color: #fff9db !important;
}

.table-success {
    background-color: #e6ffe6 !important;
}


.position-sticky {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0;
  z-index: 1;
}



#showfavbtn {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 24px;
  z-index: 2000;
}
.preloader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);

    backdrop-filter: blur(3px);           /* macht alles dahinter unscharf */
    -webkit-backdrop-filter: blur(3px);   /* Safari Unterstützung */

    display: flex;
    flex-direction: column;   /* Spinner + Text untereinander */
    justify-content: center;
    align-items: center;

    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.preloader.active {
    opacity: 1;
    pointer-events: all;
}

/* Spinner */
.spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #dc3545;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    margin-top: 20px;
    font-size: 20px;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 0 3px rgba(0,0,0,0.4);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#mainFooter {
  /*
  transform: translateY(100%);
  transition: transform 0.3s ease;
  */
  box-shadow: 0 0 20px rgba(0,0,0,.5) !important;
  /*
  background: rgba(0,0,0,0.8) !important;
  backdrop-filter: blur(3px);
  */
}
/*
.scroll_100 #mainFooter {
  transform: translateY(0%);
}
*/
