/* MakaUG source-card preview geometry, adapted for Turebe's Rwanda inventory. */
.listing-card .listing-card-media-wrap,
.rwanda-property-card .home-property-media-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  height: auto;
  min-height: 0;
}
.listing-card .listing-card-media-wrap .listing-card-media,
.rwanda-property-card .home-property-media-wrap .rwanda-property-media {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.listing-card .listing-card-media-wrap .source-video-button,
.rwanda-property-card .home-property-media-wrap .source-video-button {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  margin: 0;
  padding: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #15603f;
  cursor: pointer;
  pointer-events: auto;
}
.source-video-button > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #15603f;
  box-shadow: 0 10px 24px rgba(15,61,46,.2);
  font-size: 16px;
}
.source-video-button:hover > span { background: #fff; transform: scale(1.05); }
.source-video-button:focus-visible { outline: 3px solid #00a1de; outline-offset: -4px; }
.listing-card .source-badge,
.listing-card .video-badge,
.rwanda-property-card .source-badge,
.rwanda-property-card .video-badge {
  position: absolute;
  top: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.listing-card .source-badge, .rwanda-property-card .source-badge { left: 10px; padding: 4px 9px; }
.listing-card .video-badge, .rwanda-property-card .video-badge { right: 10px; padding: 5px 8px; background: rgba(0,0,0,.62); }
.source-badge[data-platform="youtube"] { background: #111827; }
.source-badge[data-platform="instagram"] { background: linear-gradient(45deg,#f09433,#dc2743 50%,#bc1888); }
.video-modal { z-index: 10020; overflow-y: auto; padding: 16px; background: rgba(0,0,0,.6); }
.video-modal.open { display: grid; }
.video-modal .video-modal-panel {
  width: min(960px,100%);
  max-height: 90vh;
  padding: 24px;
  overflow-y: auto;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #1f2937;
  text-align: left;
}
.video-modal .video-modal-head { position: relative; display: flex; gap: 16px; padding: 0; }
.video-modal .video-modal-head > div { min-width: 0; }
.video-modal .video-modal-platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}
.video-modal .video-modal-head h2 { margin: 0; color: #1f2937; font-size: 24px; font-weight: 900; line-height: 32px; }
.video-modal .video-modal-head p { margin: 8px 0 0; color: #4b5563; font-size: 14px; font-weight: 400; line-height: 1.5; }
.video-modal .video-modal-head button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 36px;
  height: 36px;
  border: 1px solid #bbf7d0;
  border-radius: 50%;
  background: #fff;
  color: #15803d;
}
.video-modal .video-modal-frame {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  margin-top: 16px;
  overflow: hidden;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #020617;
  color: #fff;
}
.video-modal .video-modal-frame-tall { aspect-ratio: auto; height: min(560px,65dvh); }
.video-modal .video-modal-frame iframe,
.video-modal .video-modal-frame video { display: block; width: 100%; height: 100%; border: 0; }
.detail-source-media > video { display: block; width: 100%; height: 100%; min-height: inherit; object-fit: contain; background: #020617; }
.video-modal .video-modal-fallback { max-width: 520px; margin: 0; padding: 28px; color: #e2e8f0; font-size: 16px; line-height: 1.6; text-align: center; }
.video-modal .video-modal-actions { display: flex; gap: 8px; margin-top: 16px; padding: 0; }
.video-modal .video-modal-actions a,
.video-modal .video-modal-actions button {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.video-modal .video-modal-actions button { border-color: #15803d; background: #15803d; color: #fff; }
@media (max-width: 767px) {
  .video-modal { padding: 10px; }
  .video-modal .video-modal-panel { max-height: calc(100dvh - 20px); padding: 18px; border-radius: 14px; }
  .video-modal .video-modal-head button { top: -2px; right: -2px; }
}
@media (max-width: 639px) {
  .video-modal .video-modal-actions { flex-direction: column; }
}
