/*!
 * Roovet Knowledge Panel Premium v3
 * Marker: RV_SEARCH_KP_PREMIUM_V3_CSS_20260512
 */

body.rvkp3-active .rv-serp-rail > :not(#rvKnowledgePanelCanonical) {
  display: none !important;
}

#rvKnowledgePanelCanonical {
  display: block !important;
}

#rvKnowledgePanelCanonical.rvkp3 {
  width: 100% !important;
  max-width: 382px !important;
  background: #fff !important;
  border: 1px solid #dadce0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  position: sticky !important;
  top: 132px !important;
  color: #202124 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.rvkp3-media {
  background: #f1f3f4;
  border-bottom: 1px solid #e8eaed;
}

.rvkp3-hero {
  width: 100%;
  height: 206px;
  display: block;
  object-fit: cover;
  background: #f1f3f4;
}

.rvkp3-hero-fallback {
  height: 132px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f8f9fa, #eef2f7);
  color: #5f6368;
  font-size: 42px;
  font-weight: 700;
}

.rvkp3-header {
  padding: 16px 16px 14px;
  border-bottom: 1px solid #e8eaed;
}

.rvkp3-title {
  margin: 0;
  color: #202124;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -.03em;
}

.rvkp3-subtitle {
  margin-top: 5px;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.35;
}

.rvkp3-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.rvkp3-action {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #1a0dab;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.rvkp3-action:hover {
  background: #f8f9fa;
  text-decoration: none;
}

.rvkp3-section {
  padding: 14px 16px;
  border-bottom: 1px solid #e8eaed;
}

.rvkp3-section:last-child {
  border-bottom: 0;
}

.rvkp3-heading {
  margin: 0 0 10px;
  color: #202124;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.01em;
}

.rvkp3-overview {
  margin: 0;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.55;
}

.rvkp3-facts {
  display: grid;
}

.rvkp3-fact {
  display: grid;
  grid-template-columns: 106px minmax(0,1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eef1f5;
  font-size: 13.5px;
  line-height: 1.42;
}

.rvkp3-fact:last-child {
  border-bottom: 0;
}

.rvkp3-fact-label {
  color: #5f6368;
  font-weight: 700;
}

.rvkp3-fact-value {
  color: #202124;
  overflow-wrap: anywhere;
}

.rvkp3-fact-value a {
  color: #1a0dab;
  text-decoration: none;
}

.rvkp3-fact-value a:hover {
  text-decoration: underline;
}

.rvkp3-profiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}

.rvkp3-profile {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  color: #3c4043;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
}

.rvkp3-profile-icon {
  width: 42px;
  height: 42px;
  border: 1px solid #dadce0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f8f9fa;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 800;
}

.rvkp3-related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}

.rvkp3-related-item {
  color: #202124;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.25;
}

.rvkp3-related-img,
.rvkp3-related-initial {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #f1f3f4;
  object-fit: cover;
  color: #5f6368;
  font-weight: 800;
  margin-bottom: 6px;
}

.rvkp3-related-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rvkp3-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rvkp3-source {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #3c4043;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
}

.rvkp3-source:hover {
  background: #f8f9fa;
  text-decoration: none;
}

.rvkp3-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  color: #70757a;
  font-size: 12px;
  border-top: 1px solid #e8eaed;
}

.rvkp3-footer a {
  color: #70757a;
}

/* Kill old injected KP visuals */
.rv-serp-rail .rv-bing-kp,
.rv-serp-rail .rv5-bkp,
.rv-serp-rail .rv-kp,
.rv-serp-rail #rvSafeKnowledgePanel,
.rv-serp-rail #rvKnowledgePanel,
.rv-serp-rail #rv5BingKp {
  display: none !important;
}

@media (max-width: 1100px) {
  #rvKnowledgePanelCanonical.rvkp3 {
    position: relative !important;
    top: auto !important;
    max-width: none !important;
  }

  .rvkp3-profiles,
  .rvkp3-related {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }
}

@media (max-width: 620px) {
  .rvkp3-hero {
    height: 176px;
  }

  .rvkp3-title {
    font-size: 24px;
  }

  .rvkp3-fact {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .rvkp3-profiles,
  .rvkp3-related {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}
