/* Блокировка скролла страницы при открытом попапе */
html.ms-recommendation-popup-active,
body.ms-recommendation-popup-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* Попап изображения/PDF рекомендации — полностью скрыт, когда закрыт */
.ms-recommendation-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.ms-recommendation-popup.ms-recommendation-popup-open {
  display: flex;
  pointer-events: auto;
}

.ms-recommendation-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.ms-recommendation-popup-container {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ms-recommendation-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.ms-recommendation-popup-close:hover,
.ms-recommendation-popup-close:focus {
  background: #eee;
  color: #000;
}

.ms-recommendation-popup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.5rem 1rem 1rem;
}

.ms-recommendation-popup-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: min-content;
}

.ms-recommendation-popup-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.ms-recommendation-popup-iframe {
  width: 90vw;
  max-width: 900px;
  height: 85vh;
  min-height: 400px;
  border: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Лейбл «המלצה מעודפת» */
.ms-recommendation-card-label-favorite {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.2em 0.5em;
  font-size: 0.85em;
  font-weight: 600;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.12);
  border-radius: 4px;
}
