/* WP YouTube Shorts Slider Styles */

:root {
    --wpyss-primary: #ff0000;
    --wpyss-dark: #0f0f0f;
    --wpyss-text: #ffffff;
    --wpyss-text-secondary: #aaaaaa;
    --wpyss-border-radius: 12px;
    --wpyss-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.wpyss-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Loading State */
.wpyss-loading {
    text-align: center;
    padding: 60px 20px;
}

.wpyss-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 0, 0, 0.1);
    border-top-color: var(--wpyss-primary);
    border-radius: 50%;
    animation: wpyss-spin 1s linear infinite;
}

@keyframes wpyss-spin {
    to {
        transform: rotate(360deg);
    }
}

.wpyss-loading p {
    color: var(--wpyss-text-secondary);
    font-size: 16px;
    margin: 0;
}

/* Error State */
.wpyss-error {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: var(--wpyss-border-radius);
    color: var(--wpyss-primary);
}

/* Slider Container */
.wpyss-slider {
    width: 100%;
    padding: 20px 0;
    position: relative;
}

/* Swiper Wrapper */
.wpyss-shorts-grid {
    display: flex;
    align-items: stretch;
}

/* Short Card */
.wpyss-short-card {
    background: #1a1a1a;
    border-radius: var(--wpyss-border-radius);
    overflow: hidden;
    transition: var(--wpyss-transition);
    cursor: pointer;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Para que el overlay funcione */
}

.wpyss-short-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.3);
}

.wpyss-short-card:hover .wpyss-play-overlay {
    opacity: 1;
}

/* Thumbnail Container */
.wpyss-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%;
    /* 9:16 aspect ratio */
    background: #000;
    overflow: hidden;
}

.wpyss-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--wpyss-transition);
}

.wpyss-short-card:hover .wpyss-thumbnail {
    transform: scale(1.05);
}

/* Play Overlay */
.wpyss-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--wpyss-transition);
    z-index: 2;
}

.wpyss-play-icon {
    width: 60px;
    height: 60px;
    background: var(--wpyss-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--wpyss-transition);
}

.wpyss-short-card:hover .wpyss-play-icon {
    transform: scale(1.1);
}

.wpyss-play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* Shorts Badge */
.wpyss-shorts-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Card Info - Overlay Style */
.wpyss-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 16px 16px;
    background: linear-gradient(to top, #b91751 0%, rgba(185, 23, 81, 0.8) 50%, transparent 100%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 120px;
    /* Altura mínima para el degradado */
}

.wpyss-short-title {
    font-size: 18px;
    /* Aumentado de 14px a 18px */
    font-weight: 700;
    color: #ffffff;
    /* Blanco */
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wpyss-short-views {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    /* Blanco */
    margin: 0;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation Buttons - Solo Flechas Sin Círculo */
.wpyss-nav-next,
.wpyss-nav-prev {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--wpyss-transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wpyss-nav-next:hover,
.wpyss-nav-prev:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}

.wpyss-nav-next.swiper-button-disabled,
.wpyss-nav-prev.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Flechas más grandes sin círculo */
.wpyss-nav-next::after,
.wpyss-nav-prev::after {
    font-size: 32px;
    /* Flechas grandes y visibles */
    font-weight: 900;
    line-height: 1;
}

/* Pagination */
.wpyss-pagination {
    position: relative;
    margin-top: 30px;
    text-align: center;
}

.wpyss-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #666;
    /* User requested color */
    opacity: 0.5;
    margin: 0 5px;
    transition: var(--wpyss-transition);
}

.wpyss-pagination .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 5px;
    background: var(--wpyss-primary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wpyss-container {
        max-width: 100%;
    }
}

/* Elementor Compatibility Fixes */
.elementor-kit-16 h3 {
    color: #FFF !important;
}

.elementor-kit-16 p {
    margin-block-end: 0 !important;
}

/* Modal / Popup Styles */
.wpyss-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    /* 75% opacity dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpyss-modal-overlay.visible {
    opacity: 1;
}

.wpyss-modal-content {
    background: transparent;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    /* Reduced max-width for Shorts aspect ratio */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wpyss-modal-overlay.visible .wpyss-modal-content {
    transform: scale(1);
}

.wpyss-modal-video-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 177.78%;
    /* 16:9 inverted (9:16) for Shorts */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.wpyss-modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.wpyss-modal-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #b91751;
    /* Matches plugin theme */
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s, background-color 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(185, 23, 81, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpyss-modal-btn:hover {
    background-color: #d11a5b;
    transform: translateY(-2px);
    color: white;
}

.wpyss-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wpyss-modal-close:hover {
    opacity: 1;
}

/* Modal Navigation Buttons */
/* Modal Navigation Buttons - Match Slider Design */
.wpyss-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white !important;
    /* Enforced white color */
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--wpyss-transition);
    z-index: 10001;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wpyss-modal-nav:hover {
    transform: translateY(-50%) scale(1.2);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}

.wpyss-modal-prev {
    left: -70px;
}

.wpyss-modal-next {
    right: -70px;
}

.wpyss-modal-nav::after {
    font-size: 40px;
    /* Big and bold like requested */
    font-weight: 900;
    line-height: 1;
}

.wpyss-modal-prev::after {
    content: '‹';
}

.wpyss-modal-next::after {
    content: '›';
}

.wpyss-nav-next,
.wpyss-nav-prev {
    color: #FFF !important;
}

/* Mobile responsive for modal nav */
@media (max-width: 600px) {
    .wpyss-modal-prev {
        left: 10px;
        background: rgba(0, 0, 0, 0.5);
    }

    .wpyss-modal-next {
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
    }

    .wpyss-modal-content {
        width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .wpyss-container {
        padding: 15px;
    }

    .wpyss-nav-next,
    .wpyss-nav-prev {
        width: 36px;
        height: 36px;
    }

    .wpyss-nav-next::after,
    .wpyss-nav-prev::after {
        font-size: 16px;
    }

    .wpyss-play-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .wpyss-short-title {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .wpyss-short-views {
        font-size: 12px;
    }

    .wpyss-card-info {
        padding: 12px;
    }
}

/* Custom Scrollbar for hover effects */
.wpyss-container *::-webkit-scrollbar {
    width: 8px;
}

.wpyss-container *::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.wpyss-container *::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.wpyss-container *::-webkit-scrollbar-thumb:hover {
    background: var(--wpyss-primary);
}