/**
 * WP Vertical Video Swipe - Modern Web3 Styles
 * Aesthetic: Dark mode, Glassmorphism, Neon accents
 */

/* Container Styles */
.wpvv-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000000;
    overflow: hidden;
}

/* Swiper Container */
.wpvv-swiper {
    width: 100%;
    height: 100vh;
}

/* Individual Slide */
.wpvv-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video Element */
.wpvv-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

/* Overlay Container */
.wpvv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

/* Info Section (Bottom-left with Glassmorphism) */
.wpvv-info {
    position: relative;
    max-width: 70%;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #00f2ff;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 242, 255, 0.2);
    pointer-events: auto;
    margin-bottom: 20px;
}

/* Title Styling */
.wpvv-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
    line-height: 1.3;
}

/* Description Styling */
.wpvv-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Button (Web3 Style) */
.wpvv-cta-button {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #00f2ff 0%, #7000ff 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 242, 255, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.wpvv-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.6);
    background: linear-gradient(135deg, #7000ff 0%, #00f2ff 100%);
}

/* Controls Section (Right-aligned) */
.wpvv-controls {
    position: absolute;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: auto;
}

/* Control Buttons */
.wpvv-control-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.wpvv-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #00f2ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.8);
    transform: scale(1.1);
}

.wpvv-control-btn:active {
    transform: scale(0.95);
}

/* Icon Styling */
.wpvv-icon {
    width: 24px;
    height: 24px;
    color: #00f2ff;
    filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.8));
}

/* Like Button Active State */
.wpvv-like-btn.active .wpvv-icon {
    fill: #ff006e;
    color: #ff006e;
    filter: drop-shadow(0 0 10px rgba(255, 0, 110, 0.8));
}

/* No Videos Message */
.wpvv-no-videos {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    background: #000000;
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    .wpvv-container,
    .wpvv-swiper,
    .wpvv-slide {
        height: 100vh;
        /* Account for mobile browser UI */
        height: 100dvh;
        /* Dynamic viewport height for modern browsers */
    }

    .wpvv-info {
        max-width: 100%;
        padding: 0 15px 0 0px;
        /* Left padding 55px to avoid floating buttons */
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        margin-bottom: 130px;
        /* Move up to clear bottom menu */
        width: 100%;

        display: grid;
        grid-template-columns: 1fr auto;
        /* Text takes space, button takes auto */
        grid-template-areas:
            "title button"
            "desc button";
        align-items: center;
        column-gap: 15px;
    }

    .wpvv-title {
        grid-area: title;
        font-size: 18px;
        margin-bottom: 4px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        /* Enhance readability */
        text-align: left;
    }

    .wpvv-description {
        grid-area: desc;
        font-size: 13px;
        margin: 0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        /* Limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: left;
    }

    .wpvv-cta-button {
        grid-area: button;
        padding: 8px 16px;
        font-size: 12px;
        margin-top: 0;
        white-space: nowrap;
        height: fit-content;
        justify-self: end;
    }

    .wpvv-controls {
        right: 10px;
        bottom: 220px !important;
        /* Move above the info section */
        gap: 15px;
    }

    .wpvv-control-btn {
        width: 60px;
        /* Increased further to 60px */
        height: 60px;
    }

    .wpvv-icon {
        width: 32px;
        /* Increased further to 32px */
        height: 32px;
    }


}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .wpvv-info {
        max-width: 75%;
    }
}

/* Loading Animation */
@keyframes wpvv-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.wpvv-slide.loading .wpvv-video {
    animation: wpvv-pulse 1.5s ease-in-out infinite;
}

/* Neon Glow Animation for Controls */
@keyframes wpvv-neon-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 242, 255, 0.3),
            0 0 10px rgba(0, 242, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 10px rgba(0, 242, 255, 0.5),
            0 0 20px rgba(0, 242, 255, 0.3),
            0 0 30px rgba(0, 242, 255, 0.2);
    }
}

.wpvv-control-btn {
    animation: wpvv-neon-glow 3s ease-in-out infinite;
}

/* Accessibility */
.wpvv-control-btn:focus {
    outline: 2px solid #00f2ff;
    outline-offset: 2px;
}

/* Prevent text selection on controls */
.wpvv-controls,
.wpvv-control-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Custom scrollbar (for desktop) */
.wpvv-container::-webkit-scrollbar {
    display: none;
}

.wpvv-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================
   Share Modal Styles
   ========================================= */
.wpvv-share-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    /* Bottom sheet styling */
    justify-content: center;
    opacity: 0;
    animation: wpvv-fade-in 0.3s forwards;
    pointer-events: auto;
}

.wpvv-share-modal.closing {
    animation: wpvv-fade-out 0.3s forwards;
}

.wpvv-share-content {
    width: 100%;
    max-width: 500px;
    /* Limit width on desktop */
    background: rgba(20, 20, 25, 0.95);
    border-top: 1px solid #00f2ff;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    box-shadow: 0 -5px 30px rgba(0, 242, 255, 0.2);
    transform: translateY(100%);
    animation: wpvv-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wpvv-share-modal.closing .wpvv-share-content {
    animation: wpvv-slide-down 0.3s forwards;
}

@media (min-width: 769px) {
    .wpvv-share-modal {
        align-items: center;
    }

    .wpvv-share-content {
        border-radius: 20px;
        border: 1px solid #00f2ff;
        transform: scale(0.9);
        animation: wpvv-scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .wpvv-share-modal.closing .wpvv-share-content {
        animation: wpvv-scale-out 0.3s forwards;
    }
}

.wpvv-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.wpvv-share-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.wpvv-share-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.wpvv-share-close:hover {
    color: #fff;
}

.wpvv-share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    justify-items: center;
}

.wpvv-share-option {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}

.wpvv-share-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s, filter 0.2s;
    font-size: 24px;
}

.wpvv-share-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Platform specific colors */
.wpvv-share-icon.facebook {
    background: #1877F2;
}

.wpvv-share-icon.zalo {
    background: #0068FF;
}

.wpvv-share-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.wpvv-share-icon.copy {
    background: #333;
    color: #fff;
}

.wpvv-share-option span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.wpvv-share-option:hover .wpvv-share-icon {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Animations */
@keyframes wpvv-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes wpvv-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes wpvv-slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes wpvv-slide-down {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

@keyframes wpvv-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes wpvv-scale-out {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* Toast Message */
.wpvv-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 200;
    pointer-events: none;
    animation: wpvv-fade-in 0.2s forwards;
    border: 1px solid #00f2ff;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    white-space: nowrap;
}