:root {
  --header-height: 64px;
  --footer-height: 44px;
  --sidebar-width: 260px;
  --media-drop-label: "Drop files to upload";
}

body {
  min-height: 100vh;
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
}

.app-header {
  height: var(--header-height);
  z-index: 1040;
}

.app-footer {
  height: var(--footer-height);
  z-index: 1040;
  overflow: visible;
}

.scroll-to-top-btn {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--footer-height) + 1rem);
  z-index: 1035;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.scroll-to-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.app-footer .container-fluid {
  overflow: visible;
}

.locale-switcher-anchor {
  vertical-align: middle;
}

.locale-switcher-menu {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 100%;
  left: 50%;
  margin: 0 0 2px;
  transform: translateX(-50%);
  min-width: 10rem;
  z-index: 1051;
}

.locale-switcher-menu[hidden] {
  display: none !important;
}

.locale-switcher-flag {
  font-size: 1.35rem;
  line-height: 1em;
  vertical-align: middle;
  border: 1px solid var(--bs-border-color);
  border-radius: 2px;
}

.locale-switcher-toggle {
  line-height: 1.2;
  vertical-align: middle;
}

.locale-switcher-label {
  white-space: nowrap;
}

.sidebar-desktop {
  position: fixed;
  top: var(--header-height);
  bottom: var(--footer-height);
  left: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  border-right: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.content-wrapper {
  margin-left: var(--sidebar-width);
  padding: 1rem;
}

.brand-link {
  line-height: 0;
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

[data-bs-theme="dark"] .logo-black,
[data-bs-theme="light"] .logo-white {
  display: none;
}

.menu-link {
  border-radius: 0.5rem;
}

.menu-link i {
  width: 1.5rem;
}

.contact-message {
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 12rem;
}

.nav-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
}

@media (max-width: 991.98px) {
  .content-wrapper {
    margin-left: 0;
  }
}

.media-dropzone {
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--bs-secondary-color);
  cursor: pointer;
}

.media-dropzone:hover,
.media-dropzone:focus {
  border-color: var(--bs-primary);
  color: var(--bs-body-color);
  outline: none;
}

.loa-popup-content {
  display: flex;
  flex-direction: column;
}

.loa-popup-inner.card {
  flex: 1 1 auto;
  min-height: 0;
}

.loa-popup-inner > .card-body {
  overflow: auto;
  min-height: 0;
}

.loa-popup-content .vehicle-field,
.loa-popup-content .vehicle-field-year,
.loa-popup-content .vehicle-field-make,
.loa-popup-content .vehicle-field-model,
.loa-popup-content .vehicle-field-trim,
.loa-popup-content .vehicle-field-color,
.loa-popup-content .vehicle-field-nick {
  flex: 1 1 100%;
  width: 100%;
}

body.media-drag::before {
  content: var(--media-drop-label);
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bs-body-bg) 84%, transparent);
  border: 3px dashed var(--bs-primary);
  color: var(--bs-body-color);
  font-size: 1.25rem;
  pointer-events: none;
}

.vehicle-default {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.25rem;
  background: var(--bs-secondary-bg);
  flex: 0 0 auto;
}

.vehicle-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.vehicle-field-year { flex: 0 0 6.5rem; width: 6.5rem; }
.vehicle-field-make { flex: 0 0 8.25rem; width: 8.25rem; }
.vehicle-field-model { flex: 0 0 5.5rem; width: 5.5rem; }
.vehicle-field-trim { flex: 0 0 16.5rem; width: 16.5rem; }
.vehicle-field-color { flex: 1 1 11rem; min-width: 11rem; }
.vehicle-field-nick { flex: 1 1 10rem; min-width: 10rem; }

.vehicle-build {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.vehicle-build .form-check {
  flex: 0 0 auto;
}

.vehicle-build .input-group {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.media-thumb {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bs-secondary-bg);
  border-radius: 0.25rem;
}

.media-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0.25rem;
}

.media-open .media-thumb {
  pointer-events: none;
}

.media-open:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.media-open-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.media-open-play i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4.25rem 2rem;
  background: rgba(0, 0, 0, 0.88);
}

.media-lightbox[hidden] {
  display: none !important;
}

.media-lightbox-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.media-lightbox-stage img,
.media-lightbox-stage video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}

.media-lightbox-stage video {
  width: min(1100px, 100%);
}

.media-lightbox-caption,
.media-lightbox-count {
  color: #fff;
  text-align: center;
}

.media-lightbox-count {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.media-lightbox-count[hidden] {
  display: none !important;
}

.media-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.media-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.media-lightbox-nav[hidden] {
  display: none !important;
}

.media-lightbox-nav:hover,
.media-lightbox-nav:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.32);
}

.media-lightbox-prev {
  left: 1rem;
}

.media-lightbox-next {
  right: 1rem;
}

@media (max-width: 640px) {
  .media-lightbox {
    padding: 3.25rem 0.75rem 1.5rem;
  }

  .media-lightbox-prev {
    left: 0.35rem;
  }

  .media-lightbox-next {
    right: 0.35rem;
  }
}

.modal-backdrop {
  --bs-backdrop-opacity: 1;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.overlay-loading .modal-dialog {
  max-width: 16rem;
}

.overlay-loading .modal-content {
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.overlay-loading .btn-close {
  display: none;
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
}

.overlay-loading.is-dismissable .btn-close {
  display: block;
}

.overlay-loading .spinner-border {
  width: 2.5rem;
  height: 2.5rem;
}

.overlay-loading-text {
  margin-top: 0.85rem;
}

.share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.25rem 0 0.75rem;
}

.share-qr-host {
  margin-bottom: 0.5rem;
  text-align: center;
}

.share-qr-frame {
  display: inline-flex;
  padding: 0.75rem;
  background: #fff;
  border-radius: 0.5rem;
  line-height: 0;
}

.share-qr-frame canvas,
.share-qr-frame img,
.share-qr-frame table {
  display: block;
}

.modal-dialog.modal-xxl {
  --bs-modal-width: min(1400px, calc(100vw - 2rem));
  width: var(--bs-modal-width);
  max-width: var(--bs-modal-width);
}

.share-preview-dialog {
  height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
}

.share-preview-dialog .modal-content {
  height: 100%;
}

.share-preview-dialog .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.share-preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bs-body-bg);
}
