/* 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: header bar and content share one centered column */
@media (min-width: 768px) {
  .site-header-bar {
    background-color: var(--bs-light);
    border-radius: 0 0 0.25rem 0.25rem;
  }

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

  .site-header-nav .navbar-collapse {
    display: flex !important;
    flex-grow: 1;
    align-items: center;
  }

  .site-header-nav .navbar-nav {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 0.15rem;
  }

  .site-header-nav .nav-item-cta {
    margin-left: auto;
  }

  .site-header-brand {
    flex-shrink: 0;
    margin-right: 1.25rem;
    padding: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--bs-emphasis-color);
  }
}

/* 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;
}

/* Region / country quick links (manufacturer filter + product country) */
.region-quick-links-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}

.region-quick-links-scroll {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.region-quick-links-scroll::-webkit-scrollbar {
  display: none;
}

.region-quick-link {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.8125rem;
  border-radius: 999px;
}

.region-quick-link.active {
  font-weight: 600;
}

@media (min-width: 768px) {
  .region-quick-links-scroll {
    gap: 0.4rem;
  }

  .region-quick-link {
    padding: 0.25rem 0.75rem;
  }
}

/* Header CTA — keep primary button visible (nav-link styles must not override) */
.site-header-nav .nav-link-cta {
  color: #fff;
  white-space: nowrap;
}

.site-header-nav .nav-link-cta:hover,
.site-header-nav .nav-link-cta:focus,
.site-header-nav .nav-link-cta:active {
  color: #fff;
}

/* Site header — compact and clearer on mobile */
@media (max-width: 767.98px) {
  .site-header-bar {
    border-bottom: 1px solid var(--bs-border-color);
  }

  .site-header-nav {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
  }

  .site-header-nav .navbar-brand {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--bs-emphasis-color);
    padding: 0;
  }

  .site-header-nav .navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    border-color: var(--bs-border-color);
  }

  .site-header-nav .nav-link-cta {
    margin-top: 0.5rem;
    text-align: center;
    display: inline-block;
  }
}

@media (min-width: 768px) {
  .site-header-nav .nav-link-cta {
    padding: 0.35rem 0.85rem;
    line-height: 1.25;
  }
}

@media (max-width: 767.98px) {
  body.manufacturer-list-page .site-main.mt-4 {
    margin-top: 1rem !important;
  }
}

/* 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: stretch;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .manufacturer-list-table.table-striped > tbody > tr.manufacturer-row:nth-of-type(odd) > td.manufacturer-info-cell,
  .manufacturer-list-table.table-striped > tbody > tr.manufacturer-row:nth-of-type(odd) > td.vote-cell {
    --bs-table-bg-type: initial;
    --bs-table-bg-state: initial;
    --bs-table-bg: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05));
    background-color: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05)) !important;
  }

  .manufacturer-list-table.table-striped > tbody > tr.manufacturer-row:nth-of-type(even) > td.manufacturer-info-cell,
  .manufacturer-list-table.table-striped > tbody > tr.manufacturer-row:nth-of-type(even) > td.vote-cell {
    --bs-table-bg-type: initial;
    --bs-table-bg-state: initial;
    --bs-table-bg: var(--bs-table-bg, #fff);
    background-color: var(--bs-table-bg, #fff) !important;
  }

  .manufacturer-list-table .manufacturer-row {
    border-bottom: 1px solid var(--bs-border-color);
  }

  .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: flex;
    align-items: center;
    justify-content: center;
    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;
  }
}
