/*
 * WalkTheLot Inventory
 *
 * Bootstrap handles the bulk of the presentation.
 * Keep custom styling focused and relatively small.
 */

body {
  background-color: var(--bs-tertiary-bg);
}

/*
 * Header
 */

.site-header {
  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

.site-brand {
  color: var(--bs-body-color);
  font-weight: 700;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--bs-primary);
}

/*
 * Search
 */

.inventory-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.inventory-sort {
  max-width: 240px;
}

.inventory-sidebar fieldset legend.form-label {
  float: none;
  width: auto;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/*
 * Vehicle Cards
 */

.vehicle-card {
  overflow: hidden;
}

.vehicle-photo-link {
  background-color: var(--bs-secondary-bg);
}

.vehicle-card-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.vehicle-photo-placeholder {
  width: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;

  background-color: var(--bs-secondary-bg);

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--bs-secondary-color);

  text-align: center;
  padding: 1rem;
}

.vehicle-price {
  color: var(--bs-primary);
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.vehicle-data-label {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

.vehicle-data-value {
  font-weight: 600;
}

.vehicle-vin {
  overflow-wrap: anywhere;
}

/*
 * Error / Utility Pages
 */

.wtl-error-container {
  max-width: 640px;
}

/*
 * Pagination
 */

.pagination .page-link {
  min-width: 42px;
  text-align: center;
}

/*
 * Mobile
 */

@media (max-width: 991.98px) {
  .inventory-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

@media (max-width: 767.98px) {
  .vehicle-card-image,
  .vehicle-photo-placeholder {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 575.98px) {
  .inventory-sort {
    max-width: none;
  }

  .vehicle-price {
    font-size: 1.2rem;
  }
}
