#modal-portal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 999;
}

.modal-wrapper {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sound-control {
    position: absolute;
    bottom: 3.5rem;
  	left: 0.7rem;
    z-index: 20;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sound-control-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(35, 41, 59, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    color: white;
    font-size: 0.875rem;
}

.sound-control:hover .sound-control-inner {
    background-color: rgba(35, 41, 59, 0.9);
}

.sound-control svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

.sound-control.fade-out {
    opacity: 0;
}

.sound-control:hover {
    opacity: 1;
}

/* Show sound control when hovering over the video container */
.aspect-video:hover .sound-control {
    opacity: 1;
}

.hidden {
    display: none;
}

/* Position relative for the video container */
.aspect-video {
    position: relative;
}


.modal-content {
    animation: modalContentShow 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay {
    animation: modalOverlayShow 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalContentShow {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalOverlayShow {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.5;
    }
}

.aspect-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.aspect-video iframe,
.aspect-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 640px) {
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem) !important;
    }
}
