/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Desktop: grey nav bar matches col-md-10 content width */
@media (min-width: 768px) {
  .site-header-bar {
    background-color: var(--bs-light);
  }

  /* Span the full content width and align menu items to the left */
  .site-header-nav {
    justify-content: flex-start;
  }

  .site-header-nav .navbar-collapse {
    flex-grow: 1;
    width: auto;
  }

  .site-header-nav .navbar-nav {
    justify-content: flex-start;
  }

  .site-header-nav .navbar-brand {
    margin-right: 1.5rem;
  }
}

/* Country links: clickable but not styled as default blue links */
a.country-link {
  color: inherit;
  text-decoration: none;
}

a.country-link:hover {
  color: inherit;
  text-decoration: underline;
}

.manufacturer-meta a.country-link {
  color: #495057;
}

/* Manufacturer list: compact side-by-side layout on small screens */
@media (max-width: 767.98px) {
  .manufacturer-list-table,
  .manufacturer-list-table tbody {
    display: block;
    width: 100%;
  }

  .manufacturer-list-table .manufacturer-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
  }

  .manufacturer-list-table .manufacturer-row > td.manufacturer-info-cell {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
  }

  .manufacturer-list-table .manufacturer-row > td.vote-cell {
    display: block;
    flex: 0 0 auto;
    width: auto;
  }

  .manufacturer-list-table .manufacturer-row > td.d-none {
    display: none !important;
  }

  .manufacturer-list-table thead {
    display: none;
  }
}

/* Product detail page — desktop layout */
.product-detail-page .card:hover {
  transform: none;
  box-shadow: none !important;
}

.product-gallery-main {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-gallery-main img {
  max-height: 100%;
  width: 100%;
  object-fit: contain;
}

.product-gallery-placeholder {
  min-height: 200px;
}

.product-gallery-thumb {
  width: 64px;
  height: 64px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-thumb.active,
.product-gallery-thumb:hover {
  opacity: 1;
  border-color: var(--bs-primary) !important;
}

.product-manufacturer-logo {
  max-height: 24px;
  width: auto;
}

.product-detail-price {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.product-detail-cost-teaser {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bs-success);
}

.product-detail-cost-teaser:hover {
  color: var(--bs-success);
  text-decoration: underline !important;
}

.product-detail-description {
  max-width: 52rem;
}

.product-voting-panel {
  background-color: var(--bs-light);
}

.product-vote-block {
  padding: 0.5rem 1rem;
  text-align: center;
}

.cost-use-section {
  padding-top: 0.5rem;
}

.cost-use-headline {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.cost-use-metrics-panel,
.cost-use-form-panel {
  background-color: #fff;
}

.cost-use-boxplot-svg {
  max-width: 100%;
  height: 28px;
}

.cost-use-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .product-vote-block-divider {
    border-left: 1px solid var(--bs-border-color);
  }
}

@media (min-width: 992px) {
  .product-gallery-main {
    max-height: 320px;
  }

  .product-detail-hero {
    align-items: start;
  }

  .cost-use-form-panel {
    position: sticky;
    top: 1rem;
  }
}
