/*!
 * Roovet Entity Showcase Polish v2
 * Marker: RV_ENTITY_SHOWCASE_POLISH_V2_20260512
 * Smaller, cleaner, premium search-engine entity layout.
 */

.rv-entity-showcase {
  width: min(1160px, calc(100vw - 84px)) !important;
  margin: 16px auto 28px !important;
  color: #202124 !important;
}

/* Header row */
.rv-entity-topline {
  margin-bottom: 12px !important;
  align-items: center !important;
}

.rv-entity-title {
  font-size: 30px !important;
  line-height: 1.1 !important;
  font-weight: 400 !important;
  letter-spacing: -.035em !important;
}

.rv-entity-subtitle {
  font-size: 14px !important;
  margin-top: 4px !important;
}

/* Tabs: smaller, flatter */
.rv-entity-tabs {
  gap: 8px !important;
}

.rv-entity-tab {
  min-height: 34px !important;
  border-radius: 5px !important;
  padding: 0 13px !important;
  font-size: 13px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.rv-entity-tab.is-active {
  background: #f3f0ed !important;
  border-color: #f3f0ed !important;
  color: #202124 !important;
}

/* Main grid: smaller and better balanced */
.rv-entity-grid {
  grid-template-columns: minmax(360px, .96fr) minmax(300px, .64fr) minmax(235px, .42fr) !important;
  gap: 16px !important;
}

/* Gallery: less massive */
.rv-entity-gallery {
  min-height: 286px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.rv-entity-gallery-main {
  min-height: 286px !important;
}

.rv-entity-gallery-tile {
  min-height: 142px !important;
}

.rv-entity-gallery-fallback {
  min-height: 286px !important;
  font-size: 42px !important;
}

/* Overview card: cleaner */
.rv-entity-card {
  border-radius: 10px !important;
  padding: 16px !important;
  background: #f7f3f0 !important;
  border: 1px solid #eee7e2 !important;
  box-shadow: none !important;
}

.rv-entity-card-title {
  font-size: 16px !important;
  margin-bottom: 9px !important;
}

.rv-entity-overview {
  font-size: 14px !important;
  line-height: 1.52 !important;
  -webkit-line-clamp: 6 !important;
}

.rv-entity-learn {
  margin-top: 9px !important;
  font-size: 13px !important;
}

/* Facts inside overview card */
.rv-entity-fact-mini {
  margin-top: 14px !important;
  gap: 6px !important;
  font-size: 13px !important;
}

.rv-entity-fact-mini div {
  grid-template-columns: 76px minmax(0, 1fr) !important;
}

/* Source cards */
.rv-entity-source-row {
  margin-top: 16px !important;
  grid-template-columns: minmax(0, 1fr) 84px !important;
  gap: 10px !important;
}

.rv-entity-source-card {
  min-height: 54px !important;
  border-radius: 6px !important;
  padding: 8px !important;
  box-shadow: none !important;
}

.rv-entity-source-icon {
  width: 26px !important;
  height: 26px !important;
  flex-basis: 26px !important;
  font-size: 12px !important;
}

.rv-entity-source-name {
  font-size: 13px !important;
}

.rv-entity-source-host {
  font-size: 11px !important;
}

/* Side cards: smaller */
.rv-entity-side {
  gap: 14px !important;
}

.rv-entity-side-card {
  min-height: auto !important;
  border-radius: 10px !important;
  padding: 14px !important;
  background: #f7f3f0 !important;
  border: 1px solid #eee7e2 !important;
  box-shadow: none !important;
}

.rv-entity-side-title {
  font-size: 15px !important;
  margin-bottom: 10px !important;
}

.rv-entity-feature {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 10px !important;
}

.rv-entity-feature-img,
.rv-entity-feature-fallback {
  width: 74px !important;
  height: 74px !important;
  border-radius: 6px !important;
}

.rv-entity-feature-name {
  font-size: 15px !important;
}

.rv-entity-feature-meta {
  font-size: 12px !important;
}

/* Highlight fact cards: elegant, smaller */
.rv-entity-chip-grid {
  gap: 8px !important;
}

.rv-entity-chip-card {
  min-height: 66px !important;
  border-radius: 8px !important;
  padding: 10px !important;
  background: #edf3ff !important;
  box-shadow: none !important;
}

.rv-entity-chip-label {
  font-size: 11px !important;
  margin-bottom: 9px !important;
}

.rv-entity-chip-value {
  font-size: 15px !important;
  line-height: 1.22 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Strips: smaller and cleaner */
.rv-entity-strip {
  margin-top: 18px !important;
  padding-top: 16px !important;
}

.rv-entity-strip-title {
  font-size: 21px !important;
}

.rv-entity-strip-row {
  grid-auto-columns: 104px !important;
  gap: 14px !important;
}

.rv-entity-strip-img,
.rv-entity-strip-fallback {
  width: 104px !important;
  height: 104px !important;
  border-radius: 6px !important;
}

.rv-entity-strip-name {
  font-size: 12.5px !important;
}

/* News/video result mini-card */
.rv-entity-results-card {
  margin-top: 16px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.rv-entity-result-row {
  grid-template-columns: 36px minmax(0, 1fr) 74px !important;
  padding: 11px 13px !important;
}

.rv-entity-result-icon {
  width: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
}

.rv-entity-result-title {
  font-size: 14px !important;
}

.rv-entity-result-thumb {
  width: 74px !important;
  height: 50px !important;
  border-radius: 5px !important;
}

/* Give the rest of results a cleaner transition below showcase */
body.rv-entity-showcase-active .rv-serp-shell {
  margin-top: 14px !important;
}

body.rv-entity-showcase-active .rv-serp-meta {
  color: #5f6368 !important;
  font-size: 13.5px !important;
}

/* Right Knowledge Panel should not compete with the showcase */
body.rv-entity-showcase-active .rv-serp-rail {
  padding-top: 2px !important;
}

body.rv-entity-showcase-active #rvKnowledgePanelCanonical.rvkp3,
body.rv-entity-showcase-active #rvKnowledgePanelCanonical.rvkp-pro-v2,
body.rv-entity-showcase-active #rvKnowledgePanelCanonical.rv-kp-final {
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* Make it feel more like a search engine, less like an app dashboard */
.rv-entity-showcase a {
  text-decoration: none !important;
}

.rv-entity-showcase a:hover {
  text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 1180px) {
  .rv-entity-showcase {
    width: min(1040px, calc(100vw - 46px)) !important;
  }

  .rv-entity-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr) !important;
  }

  .rv-entity-side {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .rv-entity-showcase {
    width: min(760px, calc(100vw - 28px)) !important;
    margin-top: 14px !important;
  }

  .rv-entity-topline {
    display: block !important;
  }

  .rv-entity-tabs {
    margin-top: 12px !important;
  }

  .rv-entity-grid {
    display: block !important;
  }

  .rv-entity-gallery,
  .rv-entity-card,
  .rv-entity-side {
    margin-bottom: 16px !important;
  }

  .rv-entity-side {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  .rv-entity-title {
    font-size: 26px !important;
  }

  .rv-entity-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
  }

  .rv-entity-gallery {
    grid-template-columns: 1fr !important;
    min-height: 230px !important;
  }

  .rv-entity-gallery-main {
    min-height: 230px !important;
  }

  .rv-entity-gallery-side {
    display: none !important;
  }

  .rv-entity-source-row {
    grid-template-columns: 1fr !important;
  }

  .rv-entity-strip-row {
    grid-auto-columns: 96px !important;
  }

  .rv-entity-strip-img,
  .rv-entity-strip-fallback {
    width: 96px !important;
    height: 96px !important;
  }
}
