/* Member Portal explainer video — see lib/fns/member-portal-video.php */

/* Thumbnail as play button */
/* Selectors below are `.orra-mp-video button.x` (0-2-1) so they outrank the
   Elementor kit's global button rules (`.elementor-kit-6 [type=button]` etc.). */
.orra-mp-video button.orra-mp-video__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.orra-mp-video button.orra-mp-video__thumb:hover,
.orra-mp-video button.orra-mp-video__thumb:focus,
.orra-mp-video button.orra-mp-video__thumb:focus-visible {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.orra-mp-video button.orra-mp-video__thumb:focus-visible {
  outline: 3px solid #f6ed41;
  outline-offset: 3px;
}

.orra-mp-video__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.orra-mp-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(205, 1, 13, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.orra-mp-video__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -13px 0 0 -8px;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #fff;
}

.orra-mp-video__thumb:hover .orra-mp-video__play,
.orra-mp-video__thumb:focus-visible .orra-mp-video__play {
  transform: scale(1.08);
  background: #cd010d;
}

.orra-mp-video .orra-mp-video__heading {
  margin: 0 0 0.35rem;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
}

.orra-mp-video__text p {
  margin: 0;
}

/* Login/register screen: thumbnail beside a short pitch */
.orra-mp-video--strip {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  gap: 1.25rem;
  align-items: center;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.orra-mp-video .orra-mp-video__link {
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Portal home: same shape, dismissible */
.orra-mp-video--card {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  margin: 0 0 40px;
  border-radius: 12px;
  background: #fff;
}

.orra-mp-video--card[hidden] {
  display: none;
}

.orra-mp-video button.orra-mp-video__dismiss {
  margin-top: 0.6rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #6b7280;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: underline;
  cursor: pointer;
}

.orra-mp-video button.orra-mp-video__dismiss:hover,
.orra-mp-video button.orra-mp-video__dismiss:focus {
  background: none;
  color: #111;
}

/* Phones: keep the thumbnail small and beside the text, so the login
   form isn't pushed a full screen down. */
@media (max-width: 600px) {
  .orra-mp-video--strip,
  .orra-mp-video--card {
    grid-template-columns: 120px 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.75rem;
  }

  .orra-mp-video .orra-mp-video__heading {
    font-size: 1.1rem;
  }

  .orra-mp-video__text p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .orra-mp-video--strip .orra-mp-video__play,
  .orra-mp-video--card .orra-mp-video__play {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
  }

  .orra-mp-video--strip .orra-mp-video__play::after,
  .orra-mp-video--card .orra-mp-video__play::after {
    margin: -8px 0 0 -5px;
    border-width: 8px 0 8px 13px;
  }
}

/* "How the Portal Works" page and public pages */
.orra-mp-video--page {
  max-width: 880px;
  margin: 0 0 1.5rem;
}

.orra-mp-video--button {
  max-width: 480px;
  margin: 0 0 1rem;
}

.orra-mp-video__player {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.orra-mp-video__player iframe,
.orra-mp-video-dialog__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lightbox */
/* As large as the screen allows: the player's adaptive quality picks its
   resolution partly from the player's size, so a bigger player gets HD
   sooner. Width is also capped by height, keeping 16:9 and leaving 120px
   for the close button above the frame, so it all fits on short screens. */
.orra-mp-video-dialog {
  width: min(95vw, 1600px, calc((100vh - 120px) * 16 / 9));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

/* The portal template's custom CSS shifts every direct child of <body> right
   of the sidebar (`body > :not(#wpadminbar):not(.elementor-location-header)`,
   specificity 1-1-1). This selector is 1-1-2, so the lightbox stays centered. */
body > dialog#orra-mp-video-dialog.orra-mp-video-dialog {
  margin: auto;
}

.orra-mp-video-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.orra-mp-video-dialog__frame {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.orra-mp-video-dialog button.orra-mp-video-dialog__close {
  position: absolute;
  top: -44px;
  right: -4px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 34px;
  line-height: 40px;
  cursor: pointer;
}

.orra-mp-video-dialog button.orra-mp-video-dialog__close:hover,
.orra-mp-video-dialog button.orra-mp-video-dialog__close:focus,
.orra-mp-video-dialog button.orra-mp-video-dialog__close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
