.video-player {
  overflow: hidden;
  width: 100%;
  height: 100vh; // Use full available height
  display: flex;
  flex-direction: column;
  gap: var(--c--globals--spacings--md);

  @keyframes fadeInOut {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    80% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.8);
    }
  }

  &__video {
    flex: 1; // Take available space
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 200px); // Leave space for controls
    object-fit: contain; // Keep proportions
    display: block;
    border-radius: 4px;

    &__wrapper {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 300px; // Minimum height
      padding-top: 10px;
    }
  }

  &__status-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffffcc; // TODO: Replace with new ui-kit color
    border-radius: var(--c--globals--spacings--xxxs);

    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn Out 2s ease-in-out;

    svg {
      width: 40px;
      height: 40px;
      color: white;
    }
  }

  &__controls {
    border-top: none;
    padding: 16px 0;
    transition: opacity 0.3s ease;
    opacity: 1;
    display: flex;
    flex-direction: column;
    gap: var(--c--globals--spacings--md);
    flex-shrink: 0; // Prevent controls from shrinking
  }
}

// Responsive design
@media (max-width: 768px) {
  .video-player {
    height: 100vh;

    &__video {
      max-height: calc(100vh - 150px); // Less space for controls on mobile
      margin: 8px; // Margin on the video itself

      &__wrapper {
        min-height: 250px; // Smaller minimum height on mobile
      }
    }

    &__controls {
      padding: 12px;
    }
  }
}

@media (max-width: 480px) {
  .video-player {
    &__video {
      margin: 4px; // Smaller margin on mobile
    }
  }
}

// Fullscreen styles - use native browser controls
.video-player:fullscreen {
  border-radius: 0;
  flex-direction: row; // Reset flex direction for fullscreen

  .video-player__video {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: unset;
  }

  .video-player__controls {
    display: none; // Hide custom controls in fullscreen
  }
}
