/* Video Reel Widget Styles */

/* Wrapper */
.video-reel-wrapper {
    width: 100%;
}

.video-reel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 3rem; /* gap-x-12 */
}

.video-reel-content {
    flex: 1;
    overflow-x: hidden;
}

.video-reel-marquee-wrapper {
    overflow-x: hidden;
}

/* Marquee Container */
.video-marquee-container {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
}

/* Video Item */
.video-item {
    width: 235px;
    min-height: 420px;
    flex-shrink: 0;
    border-radius: 1rem; /* rounded-2xl */
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

/* Video Element */
.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

/* Play Button */
.video-item button {
    position: absolute;
    cursor: pointer;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem; /* size-16 = 64px */
    height: 4rem;
    background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
    color: #fff;
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.video-item.group:hover button {
    visibility: visible;
    opacity: 1;
}

.video-item button svg {
    width: 1.75rem; /* size-7 = 28px */
    height: 1.75rem;
}

/* Screen Reader Only */
.sr-only {
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.8); /* bg-black/80 */
    align-items: center;
    justify-content: center;
    touch-action: pan-y; /* Allow vertical panning for swipe gestures */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.video-modal.hidden {
    display: none;
}

.video-modal.flex {
    display: flex;
}

/* Video Modal Container */
.video-modal-container {
    position: relative;
    width: 100%;
    max-width: 380px; /* max-w-sm = 384px */
    max-height: 650px;
    height: 100%;
    border-radius: 1rem; /* rounded-2xl */
    background-color: rgba(0, 0, 0, 0.9); /* bg-black/90 */
    overflow: hidden;
}

.video-modal-container.group-modal {
    /* For group/modal hover effects - styles applied via Elementor controls */
    position: relative;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y; /* Allow vertical panning for swipe gestures */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Modal Video Elements */
.video-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
    z-index: 10;
}

.video-container video#modal-video-next {
    z-index: 0;
}

/* Close Button */
.video-modal-close {
    position: absolute;
    top: 1.25rem; /* top-5 */
    left: 1.25rem; /* left-5 */
    z-index: 30;
    border-radius: 9999px; /* rounded-full */
    background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
    padding: 0.5rem; /* p-2 */
    color: #fff;
    transition: color 0.15s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    color: #d1d5db; /* text-gray-300 */
}

.video-modal-close svg {
    width: 1.25rem; /* size-5 = 20px */
    height: 1.25rem;
}

/* Navigation Buttons */
.video-nav-buttons {
    position: absolute;
    right: 1.25rem; /* right-5 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem; /* gap-y-2 */
    z-index: 30;
}

.video-nav-btn {
    cursor: pointer;
    border-radius: 9999px; /* rounded-full */
    background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
    padding: 0.5rem; /* p-2 */
    color: #fff;
    transition: color 0.15s;
    border: none;
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-nav-btn:hover {
    color: #d1d5db; /* text-gray-300 */
}

.video-nav-btn svg {
    width: 1.25rem; /* size-5 = 20px */
    height: 1.25rem;
}

/* Mute Button */
.video-mute-btn {
    position: absolute;
    bottom: 2.5rem; /* bottom-10 */
    right: 1.25rem; /* right-5 */
    border-radius: 9999px; /* rounded-full */
    background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
    padding: 0.5rem; /* p-2 */
    color: #fff;
    transition: color 0.15s;
    z-index: 30;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-mute-btn:hover {
    color: #d1d5db; /* text-gray-300 */
}

.video-mute-btn svg {
    width: 1.25rem; /* size-5 = 20px */
    height: 1.25rem;
}

.video-mute-btn .hidden {
    display: none;
}

/* Play/Pause Button */
.video-play-pause-btn {
    position: absolute;
    cursor: pointer;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem; /* size-16 = 64px */
    height: 4rem;
    background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
    color: #fff;
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 30;
    visibility: hidden;
    opacity: 0;
    border: none;
}

.video-modal-container.group-modal:hover .video-play-pause-btn {
    visibility: visible;
    opacity: 1;
}

.video-play-pause-btn svg {
    width: 1.75rem; /* size-7 = 28px */
    height: 1.75rem;
}

.video-play-pause-btn .hidden {
    display: none;
}

/* Progress Bar Container */
.video-progress-container {
    position: absolute;
    max-width: 90%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    bottom: 0.75rem; /* bottom-3 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    cursor: pointer;
}

.video-progress-track {
    background-color: rgba(0, 0, 0, 0.1); /* bg-black/10 */
    height: 0.25rem; /* h-1 */
    border-radius: 9999px; /* rounded-full */
    width: 100%;
    position: relative;
}

/* Progress Bar */
.video-progress-bar {
    background-color: #fff;
    height: 100%;
    border-radius: 9999px; /* rounded-full */
    transition: all 0.3s;
    position: absolute;
    left: 0;
    top: 0;
}

/* Hidden utility */
.hidden {
    display: none !important;
}
