/* =========================================================================
   VIDEO PLAYER COMPONENT
   ========================================================================= */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 1.08 / 1;
    max-height: 800px;
    max-width: 800px;
}

.video-player__inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 1.5rem;
}

.video-player__cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-player__cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-player__cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
}

.video-player__text-overlay {
    position: absolute;
    bottom: -1.5rem;
    border-radius: 1rem;
    left: -1.5rem;
    padding: 1.5rem;
    z-index: 10;
    pointer-events: none;
    background-color: var(--wp--preset--color--bg-color);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: var(--wp--preset--color--text-primary);
    box-shadow: 0 4px 20px -4px hsl(25 30% 15% / 0.08);
}

.video-player__text-overlay blockquote {
    margin: 0;
    padding: 0;
    appearance: none;
    font-family: var(--font-second);
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: var(--wp--preset--color--text-primary);
}

.video-player__text-overlay blockquote p {
    color: var(--wp--preset--color--text-primary);
    font-size: 1.125rem;
    line-height: 1.75rem;
    margin: 0;
    padding: 0;
}

.video-player__text-overlay p {
    color: var(--wp--preset--color--text-secondary);
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin: 0;
}

.video-player__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.video-player__play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

@media (hover: hover) {
    .video-player__play-btn:hover {
        background: rgba(255, 255, 255, 1);
        transform: translate(-50%, -50%) scale(1.1);
    }

    .video-player__cover:hover::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            rgba(0, 0, 0, 0.5) 100%
        );
    }
}

.video-player__play-icon {
    width: 0;
    height: 0;
    border-left: 24px solid var(--wp--preset--color--primary, #dc9170);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 4px;
    display: block;
}

.video-player__container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-player__youtube {
    position: relative;
    width: 100%;
    height: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-player__youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-player__vimeo {
    position: relative;
    width: 100%;
    height: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-player__vimeo iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-player__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide cover when video is playing */
.video-player--playing .video-player__cover {
    opacity: 0;
    pointer-events: none;
}

.video-player--playing .video-player__container {
    display: block !important;
}

/* Hide text overlay when video is playing */
.video-player--playing .video-player__text-overlay {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .video-player__play-btn {
        width: 64px;
        height: 64px;
    }

    .video-player__play-icon {
        border-left-width: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
        margin-left: 3px;
    }
}
