/* Movie Detail Page Styles (scoped by .movie-detail) */

/* Prevent scrolling when modal is open */
body.modal-open,
html.modal-open {
  overflow: hidden !important;
  height: 100%;
}

body.modal-open .exibidor-header {
  display: none !important;
}

.movie-detail {
  background: #171717;
  position: relative;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
}

.movie-detail__vector-top-left {
  position: absolute;
  top: 0;
  left: -22px;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  user-select: none;
}

.movie-detail .container {
  display: flex;
  flex-direction: column;
  padding: 128px 100px;
  align-items: center;
  width: 100%;
  align-self: stretch;
  max-width: 1680px;
  margin: 0 auto;
  z-index: 10;
  position: relative;

  @media (min-width: 1700px) {
    padding: 128px 0;
  }

  @media (max-width: 1119px) {
    padding: 100px var(--Section-Margins, 20px) var(--7xl, 64px)
      var(--Section-Margins, 20px);
  }
}

.movie-detail__main {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

.movie-detail__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.movie-detail__header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 32px;

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
  }
}

.movie-detail__original-title {
  color: var(--Neutral-Gray-300, #b0b0b0);
  flex: 1 0 0;
  font-family: "SF UI Text";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px;

  @media (max-width: 768px) {
    font-size: 16px;
  }
}

.movie-detail__title {
  color: var(--Neutral-Pure-White, #fff);
  font-family: "SF UI Display";
  font-size: 36px;
  font-style: normal;
  font-weight: 600;
  line-height: 54px;
  margin: 0;

  @media (max-width: 768px) {
    font-size: 32px;
  }
}

.movie-detail__release-date-container {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  z-index: 10;

  @media (max-width: 768px) {
    border-top: 1px solid var(--Neutral-Gray-800, #454545);
    padding-top: 24px;
    width: 100%;
    justify-content: space-between;
  }
}

.movie-detail__release-label {
  color: var(--Neutral-Pure-White, #fff);

  font-family: "SF UI Text";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px;
}

.movie-detail__release-date {
  display: flex;
  padding: var(--sm, 8px) 14px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: var(--Pill, 999px);
  background: var(--Brand-Primary-400, #feb42b);
  color: var(--Neutral-Gray-950, #171717);

  font-family: "SF UI Text", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;

  @media (max-width: 768px) {
    font-size: 14px;
  }
}

.movie-detail__image-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.movie-detail__image-container-inner {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 16px;
  z-index: 10;

  @media (max-width: 1119px) {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 16px;
  }
  @media (max-width: 768px) {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

.movie-detail__poster {
  img {
    aspect-ratio: 580 / 900;
    border-radius: 12px;

    @media (max-width: 1119px) {
      flex-shrink: 0;
    }

    @media (max-width: 768px) {
      width: 246px;
    }
  }

  @media (max-width: 768px) {
    flex: 0 0 auto;
  }
}

.movie-detail__trailer {
  width: 100%;
  border-radius: 12px;

  @media (max-width: 768px) {
    flex: 0 0 auto;
    max-width: 400px;
  }

  iframe {
    max-height: 400px;

    .ytp-cued-thumbnail-overlay-image {
      background-size: contain;
    }
    @media (max-width: 768px) {
      aspect-ratio: 16 / 9;
    }
  }

  img {
    max-height: 400px;
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
  }
}

.movie-detail__trailer iframe {
  border-radius: 12px;
  width: 100%;
}

.movie-detail__category-infos {
  display: flex;
  width: 100%;
  justify-content: space-between;

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

.movie-detail__category-infos-inner {
  display: flex;
  gap: 16px;
}

.movie-detail__genre {
  display: flex;
  padding: var(--xs, 4px) var(--md, 12px) 5px var(--md, 12px);
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: var(--Pill, 999px);
  border: 1px solid var(--Neutral-Gray-800, #454545);
  color: var(--Neutral-Pure-White, #fff);

  font-family: "SF UI Text";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.movie-detail__infos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.movie-detail__classification {
  display: flex;
  padding: var(--xs, 4px) var(--sm, 8px);
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--Neutral-Pure-White, #fff);
  text-align: center;
  border-radius: var(--sm, 8px);
  background: #f59218;

  font-family: "SF UI Text";
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
}

.movie-detail__classification--livre {
  background: #2d963f;
  padding: 4px 10px;
}

.movie-detail__duration,
.movie-detail__distributor {
  color: var(--Neutral-Gray-200, #6d6d6d);
  text-align: center;

  font-family: "SF UI Text";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: 26px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-detail__distributor-logo {
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
  filter: brightness(40);

  @media (max-width: 768px) {
    max-height: 30px !important;
  }
}

.movie-detail__separator {
  color: #d6d6d6;
}

.movie-detail__general-info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--5xl, 48px);
  width: 100%;
  flex: 1 0 0;
  margin-top: 80px;

  @media (max-width: 768px) {
    gap: 32px;
    margin-top: 56px;
  }
}

.movie-detail__general-info-container-header {
  display: flex;
  align-items: center;
  gap: var(--md, 12px);
  align-self: stretch;
}

.movie-detail__general-info-container-header-title {
  color: var(--Neutral-Pure-White, #fff);

  font-family: "SF UI Display";
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  line-height: 50px;

  @media (max-width: 768px) {
    font-size: 28px;
  }
}

.movie-detail__general-info-container-header-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
}

.movie-detail__general-info-container-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  align-self: stretch;
}

.movie-detail__info-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  max-width: 1480px;
  align-items: center;
  gap: 72px;
  border-bottom: 1px solid var(--Neutral-Gray-800, #3a3a3a);
  padding-bottom: 18px;
  margin-bottom: 18px;

  h3 {
    color: var(--Neutral-Pure-White, #fff);
    min-width: 200px;

    font-family: "SF UI Text", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    flex-shrink: 0;
  }

  p {
    color: var(--Neutral-Gray-300, #b0b0b0);

    font-family: "SF UI Text", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    flex: 1 0 0;
  }

  &:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 16px;

    h3 {
      font-size: 16px;
    }

    p {
      font-size: 14px;
    }
  }
}
/* Gallery Styles */
.movie-detail__gallery {
  display: flex;
  flex-direction: column;
  width: 100vw;
  margin-top: 48px;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 88px 100px 112px 100px;
  background: #feb42b;
  border-top: none;
  overflow: hidden;
}

.movie-detail__gallery-inner {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.movie-detail__gallery::before {
  content: url(../assets/images/most-read-news-bg.svg);
  position: absolute;
  bottom: -112px;
  right: 0;
  width: auto;
  z-index: 0;
  pointer-events: none;
}

.movie-detail__gallery::after {
  content: url(../assets/images/most-read-news-bg.svg);
  position: absolute;
  top: -88px;
  left: 0;
  width: auto;
  transform: rotate(180deg);
  z-index: 0;
  pointer-events: none;
}

.movie-detail__gallery-header {
  width: 100%;
  margin-bottom: 32px;
}

.movie-detail__gallery-title {
  color: #171717;
  font-family: "SF UI Display";
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  line-height: 50px;
  margin: 0;
}

.movie-detail__gallery-content {
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.movie-detail__gallery-principal-image,
.movie-detail__gallery-image-item {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow:
    0 175px 49px 0 rgba(0, 0, 0, 0),
    0 112px 45px 0 rgba(0, 0, 0, 0.04),
    0 63px 38px 0 rgba(0, 0, 0, 0.12),
    0 7px 15px 0 rgba(0, 0, 0, 0.23),
    0 28px 28px 0 rgba(0, 0, 0, 0.2);

  @media (max-width: 768px) {
    box-shadow: none;
  }
}

.movie-detail__gallery-principal-image img,
.movie-detail__gallery-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  object-position: center;
}

.movie-detail__gallery-principal-image {
  width: 100%;
}

.movie-detail__gallery-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.movie-detail__gallery-image-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  flex: 1;
  min-height: 0;
  position: relative;
}

.movie-detail__gallery-image-item-more {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 12px;
  transition: all 0.3s ease-in-out;
  font-family: "SF UI Text";
  font-size: 16px;
  font-weight: 600;
}

.movie-detail__gallery-image-item-more:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Gallery Modal Styles */
.movie-detail__gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.movie-detail__gallery-modal-title {
  color: #fff;
  font-family: "SF UI Display";
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 24px;
  width: 100%;
  text-align: left;

  @media (max-width: 768px) {
    position: absolute;
    top: 60px;
    left: 20px;
  }
}

.movie-detail__gallery-modal-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
}

@media (min-width: 1200px) {
  .movie-detail__gallery-modal-content {
    max-width: 1200px;
  }
}

.movie-detail__gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  width: 100%;
  left: 0;
  padding: 0 20px;
  pointer-events: none;
}

.movie-detail__gallery-modal-nav-prev,
.movie-detail__gallery-modal-nav-next {
  padding: 12px;
  background-color: #171717;
  color: #fff;
  border: 1px solid #6d6d6d;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  height: 48px;
  width: 48px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    border: 1px solid #feb42b;
    background-color: #feb42b;
    color: #171717;
  }

  svg {
    width: 20px;
    height: 20px;
  }

  @media (max-width: 768px) {
    display: none;
  }
}

.movie-detail__gallery-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;

  @media (max-width: 768px) {
    top: 60px;
  }
}

.movie-detail__gallery-modal-close:hover {
  transform: scale(1.1);
}

.movie-detail__gallery-modal .movieDetailSwiper {
  width: 100%;
  max-width: 1069px;
  height: auto;
  max-height: 60vh;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.movie-detail__gallery-modal .movieDetailSwiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-detail__gallery-modal .movieDetailSwiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.movie-detail__gallery-modal-count-images {
  color: #b0b0b0;
  font-family: "SF UI Text";
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 16px;
  text-align: center;
}

.movie-detail__gallery-modal .movieDetailSwiperThumbs {
  width: 100%;
  max-width: 600px;
  height: 100px;
}

.movie-detail__gallery-modal .movieDetailSwiperThumbs .swiper-slide {
  opacity: 0.4;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.movie-detail__gallery-modal
  .movieDetailSwiperThumbs
  .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid var(--Brand-Primary-400, #feb42b);
}

.movie-detail__gallery-modal .movieDetailSwiperThumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Styles for Gallery */
@media (max-width: 768px) {
  .movie-detail__gallery {
    margin-top: 32px;
    padding: 64px 40px 64px 40px;
  }

  .movie-detail__gallery-inner {
    max-width: 100%;
    padding: 0;
  }

  .movie-detail__gallery::before {
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
  }

  .movie-detail__gallery::after {
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
  }

  .movie-detail__gallery-title {
    font-size: 28px;
    line-height: 38px;
  }

  .movie-detail__gallery-content {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 16px;
    padding-bottom: 0;
  }

  .movie-detail__gallery-content::-webkit-scrollbar {
    display: none;
  }

  .movie-detail__gallery-principal-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
    height: 225px;
  }

  .movie-detail__gallery-images {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex: 0 0 auto;
  }

  .movie-detail__gallery-image-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
    height: 225px;
  }

  .movie-detail__gallery-modal-nav {
    padding: 0 10px;
  }

  .movie-detail__gallery-modal-nav-prev,
  .movie-detail__gallery-modal-nav-next,
  .movie-detail__gallery-modal-close {
    width: 40px;
    height: 40px;
  }

  .movie-detail__gallery-modal .movieDetailSwiper {
    max-height: 50vh;
  }

  .movie-detail__gallery-modal .movieDetailSwiperThumbs {
    height: 60px;
    max-width: 100%;
  }
}

@media (max-width: 599px) {
  .movie-detail__gallery {
    padding: 64px 20px 64px 20px;
  }

  .movie-detail__gallery::before {
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
  }

  .movie-detail__gallery::after {
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
  }
}

/* Copy Notification */
.movie-detail__copy-notification {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #171717;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  font-family: "SF UI Text", sans-serif;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-detail__copy-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .movie-detail__copy-notification {
    top: 80px;
    padding: 12px 20px;
    font-size: 14px;
  }
}
