/* ATC Review UX + SEO v1.2.2. Scoped to /tire-reviews/ pages. */
.atc-ux-model-tile { position: relative !important; }
.atc-ux-model-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; gap: 4px; align-items: center;
  min-height: 27px; padding: 4px 8px; border: 1px solid #f4dca7;
  border-radius: 999px; background: #fff5d9; color: #865700;
  font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap;
  pointer-events: none;
}
.atc-ux-model-badge .atc-ux-model-star { color: #da9b12; font-size: 13px; }
.atc-ux-model-badge.is-unrated { background: #f5f6f9; border-color: #e2e5ec; color: #697386; }
.atc-ux-model-badge.is-unrated .atc-ux-model-star { color: #8b95a5; }
/* Remove old Core-only model-rating badges, after the unified badge is installed. */
.atc-ux-model-tile[data-atc-ux-badge-ready="1"] .atc-tr-model-average:not(.atc-ux-model-badge),
.atc-ux-model-tile[data-atc-ux-badge-ready="1"] .atc-tr-model-rating:not(.atc-ux-model-badge) {display: none !important;}
/* Preserve real stars from the TyreReviews importer; suppress old AI pseudoelements. */
body .atc-tr-card[data-atc-ux-imported="1"] header > div::before,
body .atc-tr-card[data-atc-ux-imported="1"] header > div::after {
  content: none !important; display: none !important;
}
body .atc-tr-card[data-atc-ux-imported="1"] .atc-tr-source-badge { display: none !important; }
body .atc-tr-card[data-atc-ux-imported="1"] .atc-tr-source-ratedline { margin: 3px 0; }
/* Accessible disclosure of original source without misleading AI score badge. */
.atc-ux-attribution { color: #6b7280; font-size: 11px; font-weight: 400; }
/* Desktop: cover the viewport, not only the centered site wrapper. Keep Core's visibility rules. */
@media (min-width: 768px) {
  body .atc-tr-modal {
    position: fixed !important; inset: 0 !important;
    width: 100vw !important; height: 100vh !important; height: 100dvh !important;
    min-width: 100vw !important; max-width: none !important;
    min-height: 100vh !important; max-height: none !important;
    margin: 0 !important; padding: 16px !important;
    box-sizing: border-box !important;
    background: rgba(9, 13, 22, .77) !important;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 2147482000 !important;
  }
  body .atc-tr-modal .atc-tr-dialog {
    position: absolute !important; top: 50% !important; left: 50% !important;
    right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    box-sizing: border-box !important;
    width: min(840px, calc(100vw - 44px)) !important;
    max-width: 840px !important;
    min-width: 0 !important;
    max-height: calc(100vh - 44px) !important;
    max-height: calc(100dvh - 44px) !important;
    margin: 0 !important;
    overflow-y: auto !important; overflow-x: hidden !important;
    border-radius: 16px !important;
  }
}
@media (max-width: 767px) {
  .atc-ux-model-badge { top: 9px; right: 8px; font-size: 11px; min-height: 24px; padding: 3px 6px; }
  /* Preserve existing mobile bottom-sheet implementation. */
}

/* 1.2.1: consistently show the unified badge above legacy badges. */
.atc-ux-model-tile[data-atc-ux-badge-ready="1"]{position:relative!important;}

/* v1.2.2: one visible model rating regardless of review origin. */
.atc-ux-unified-model-summary .atc-tr-overall strong,
.atc-ux-unified-model-summary strong.atc-ux-unified-score {
  font-variant-numeric: tabular-nums;
}
.atc-ux-unified-model-summary .atc-ur-rating-note {
  color: #5d6778;
}
