/* Wistia on iPhone — hide pre-crawled player chrome until script finishes */

@media (max-width: 992px) {
  .mal-wistia-wrap {
    position: relative;
    background: #1a1a1a;
    min-height: 180px;
    overflow: hidden;
  }

  .mal-wistia-wrap .wistia_embed {
    min-height: 180px;
  }

  /* Snapshot chrome from GHL crawl — hide until ready */
  .mal-wistia-wrap:not(.mal-wistia-ready) .w-chrome,
  .mal-wistia-wrap:not(.mal-wistia-ready) [id^="wistia_chrome"],
  .mal-wistia-wrap:not(.mal-wistia-ready) [id^="wistia_grid_"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mal-wistia-wrap.mal-wistia-ready .w-chrome,
  .mal-wistia-wrap.mal-wistia-ready [id^="wistia_chrome"] {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mal-wistia-wrap:not(.mal-wistia-ready)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, #2a2a2a 8%, #3a3a3a 18%, #2a2a2a 33%);
    background-size: 200% 100%;
    animation: mal-wistia-shimmer 1.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
  }

  .mal-wistia-wrap.mal-wistia-ready::after {
    display: none;
  }
}

@keyframes mal-wistia-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
