/* PAGE 2: VIP PORTRAIT SLIDER */


#page_2 {
  --animation-switch-duration: 0.6s;
  overflow: hidden;
  background-color: var(--color-accent);
  will-change: opacity;
}

/* Alternative color (Mariée) */
#page_2::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #c8aaaa; 
  pointer-events: none;
  z-index: -1;

  transition: opacity calc(var(--animation-switch-duration) * 1.8) ease;
  opacity: 0;
}

#page_2.alternative::after {
  opacity: 1;
}


#page_2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../Ressources/tile.webp);
  background-repeat: repeat;
  background-size: 200px auto;
  background-position: center;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.portrait__container__main {
  position: absolute;
  width: var(--frame-width);
  font-size: calc(var(--frame-width) * 0.1);
  height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Navigation Buttons  --- */

.portrait__container__main .page__button__nav {
  position: absolute;
  z-index: 20;
  width: var(--nav-button-size);
  height: var(--nav-button-size);

  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.3em;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-size 0.25s ease;
}

.portrait__container__main .page__button__nav:hover {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.4);
}

.page__button__nav#guest_previous {
  top: 50.5%;
  left: calc(var(--nav-button-size) * -0.9);
  transform: translate(0, -50%);
}

.page__button__nav#guest_next {
  top: 50.1%;
  right: calc(var(--nav-button-size) * -0.9);
  transform: translate(0, -50%);
}

.page__button__nav#guest_previous img,
.page__button__nav#guest_next img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

.guest_previous_img_container img {
      transform: rotate(-90deg);
}

.guest_next_img_container img {
      transform: rotate(90deg);
}

/* --- Portrait Frame and Image --- */

.portrait__container {
  width: 100%;
  height: 100%;
  background-color: transparent;
}

.portrait__frame {
  position: absolute;
  z-index: 2;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dropShadow {
    filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 1));
}

.dropShadow-soft {
    filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.7));
}

.portrait__frame__glass {
  opacity: 0.4;
}

.portrait__pp_container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  width: 100%;
  /* Egg-shaped mask */
  mask-image: radial-gradient(ellipse 45% calc((var(--frame-width))*0.52) at center, black 99%, transparent 100%);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

/* The actual images */
.portrait__pp {
    position: absolute;
    width: 100%;
    object-fit: cover;
    top: 50%;
    left: 50%;
    z-index: 5;
    transform: translate(200%, -50%);
}

/* --- SLIDE STATES --- */

.portrait__pp.active {
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.portrait__pp.exit-to-left {
    opacity: 1;
    animation: animation-pp-exit-to-left 1.2s cubic-bezier( 0.68, -0.2, 0.265, 1.2 ) forwards;
}

.portrait__pp.exit-to-right {
    opacity: 1;
    animation: animation-pp-exit-to-right 1.2s cubic-bezier( 0.68, -0.2, 0.265, 1.2 ) forwards;
}

.portrait__pp.enter-from-left {
    opacity: 1;
    animation: animation-pp-enter-from-left 1.2s cubic-bezier( 0.68, -0.2, 0.265, 1.2 ) forwards;
}

.portrait__pp.enter-from-right {
    opacity: 1;
    animation: animation-pp-enter-from-right 1.2s cubic-bezier( 0.68, -0.2, 0.265, 1.2 ) forwards;
}



@keyframes animation-pp-enter-from-right {
  0% {
    transform: scale(0.8) translate(45%, -50%);
  }
  100% {
    transform: scale(1) translate(-50%, -50%);
  }
}
@keyframes animation-pp-enter-from-left {
  0% {
    transform: scale(0.8) translate(-145%, -50%);
  }
  100% {
    transform: scale(1) translate(-50%, -50%);
  }
}
@keyframes animation-pp-exit-to-right {
  0% {
    transform: scale(1) translate(-50%, -50%);
  }
  100% {
    transform: scale(0.8) translate(45%, -50%);
  }
}
@keyframes animation-pp-exit-to-left {
  0% {
    transform: scale(1) translate(-50%, -50%);
  }
  100% {
    transform: scale(0.8) translate(-145%, -50%);
  }
}






/* --- Portrait Label  --- */

.portrait__label__container {
  position: absolute;
  top: calc(50% + var(--frame-width)*0.54);
  left: 50%;
  width: calc(var(--frame-width)*0.3);
  transform: translateX(-50%);
  z-index: 2;
  container-type: inline-size;
}

.portrait__label__text {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "AlexBrush", cursive;
  font-size: 16cqi;
  max-width: 100%;
  white-space: nowrap;
  color: #664c4c;
  text-shadow: rgba(163, 114, 65, 0.63) 0.02em 0.02em;
}

.portrait__label__image {
  width: 100%;
}

/* TEAM TOGGLE */
.wedding-toggle__container {
  position: absolute;
  top: max(5%, calc(50% - var(--frame-width)*0.9));
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 20;
  font-size: min(0.30em, 14px);
}

.team_toggle-container {
  position: relative;
  width: 25em;
  height: 3em;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.7em;
  box-shadow: inset 0.125em 0.125em 0.3125em rgba(0, 0, 0, 0.2), inset -0.125em -0.125em 0.3125em rgba(255, 255, 255, 0.7);
  cursor: pointer;
  overflow: hidden;
}

.team_toggle-slider {
  position: absolute;
  top: 0.25em;
  left: 0.25em;
  width: 12.25em;
  height: 2.55em;
  background: linear-gradient(145deg, #ffffff, #f0f4f8);
  border-radius: 0.5em;
  box-shadow: 0.125em 0.125em 0.25em rgba(0, 0, 0, 0.15), -0.0625em -0.0625em 0.1875em rgba(255, 255, 255, 0.8);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.team_toggle-container.active .team_toggle-slider {
  transform: translateX(12.25em);
}

.team_toggle-labels {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 2;
}

.team_toggle-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 0.9375em;
    font-weight: 580;
    transition: color 0.3s ease;
    user-select: none;
    padding: 0 0.625em;
    text-align: center;
}

.team_toggle-label.left {
  color: #3f7d3d;
}

.team_toggle-label.right {
  color: #b894a5;
}

.team_toggle-container.active .team_toggle-label.left {
  color: #8d9b8d;
}

.team_toggle-container.active .team_toggle-label.right {
  color: #c84a7f;
}


.temoin-container {
    position: absolute;
    left: 7%;
    top: calc(50% - var(--frame-width)*0.38);
    z-index: 2;
    transform: translate(-50%, -50%) rotate(-59deg);

    opacity: 0;
    transition: opacity 1.3s ease;
}

.temoin-container.active {
    opacity: 1;
}

.temoin-image-wrapper {
    position: relative;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.temoin-image {
    display: block;
    opacity: 0.4;
    position: relative;
    width: 3.2em;
}

.temoin-image-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 45%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0) 55%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 250% 100%;
    -webkit-mask: url('../Ressources/VIP/Temoin-Text.webp') center/contain no-repeat;
    mask: url('../Ressources/VIP/Temoin-Text.webp') center/contain no-repeat;
    animation: wave-glow 3s linear infinite;
    pointer-events: none;
}

@keyframes wave-glow {
    0% {
        background-position: 150% 0;
    }
    100% {
        background-position: -50% 0;
    }
}

#page_2 > .audio-player {
  position: absolute;
  bottom: 0;
  left: 0;

  margin: 1em;
}


#page_2 > .bandParent {
    position: absolute;
    top: calc(100% - 20px);
}

#page_2 > .bandParent.flipY {
    position: absolute;
    top: 20px;
}