/* Basic CSS for Slatan YT Playlist Widget */

.syt-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* default, overridden by Elementor settings */
    gap: 20px; /* default, overridden by Elementor settings */
}

.syt-video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.syt-video-item a, .syt-video-item .syt-playing {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    text-align: left;
}

.syt-video-item :focus-visible, .syt-page-dot:focus-visible, .syt-lightbox-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.syt-grid-container > [hidden] {
    display: none !important;
}

.syt-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.syt-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.syt-thumbnail iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.syt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    opacity: 0.8;
    transition: opacity 0.3s, background 0.3s;
}

.syt-play-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.syt-play-icon i {
    font-size: 1em;
}

.syt-video-item:hover .syt-play-icon {
    opacity: 1;
    background: #ff0000;
}

.syt-video-content {
    padding: 15px;
}

.syt-video-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.syt-video-desc {
    margin: 10px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.syt-video-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.syt-video-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: clamp(30px, 4vw, 42px);
    padding: clamp(5px, .9vw, 9px) clamp(12px, 1.7vw, 20px);
    border-radius: 999px;
    background: #252525;
    color: #e8e8e8;
    font-size: clamp(13px, 1.5vw, 18px);
    line-height: 1.2;
    white-space: nowrap;
}

.syt-meta-icon {
    display: block;
    width: clamp(16px, 1.7vw, 20px);
    height: clamp(16px, 1.7vw, 20px);
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Carousel specific */
.syt-carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.syt-carousel-editor-notice {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-left: 3px solid #dba617;
    background: #fff8e5;
    color: #4a3b13;
    font-size: 13px;
}

/* Keep the track layout intact when Elementor defers or themes override Swiper CSS. */
.elementor-widget-slatan_youtube_playlist .syt-carousel-container > .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap;
    width: 100%;
    overflow: visible !important;
    box-sizing: content-box;
}

.elementor-widget-slatan_youtube_playlist .syt-carousel-container > .swiper-wrapper > .swiper-slide {
    flex: 0 0 auto !important;
    min-width: 0;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-right: var(--syt-carousel-gap, 20px) !important;
    margin-left: 0 !important;
}

[dir="rtl"] .elementor-widget-slatan_youtube_playlist .syt-carousel-container > .swiper-wrapper > .swiper-slide {
    margin-right: 0 !important;
    margin-left: var(--syt-carousel-gap, 20px) !important;
}

/* Custom Lightbox */
.syt-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.syt-lightbox-open {
    overflow: hidden;
}
.syt-lightbox-overlay.syt-show {
    opacity: 1;
    visibility: visible;
}
.syt-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.syt-lightbox-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: absolute !important;
    top: -40px !important;
    right: -40px !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(20, 20, 20, .92) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #fff !important;
    font-family: Arial, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: background-color .2s ease !important;
}
.syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close::before,
.syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close::after {
    display: none !important;
    content: none !important;
}
.syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close:hover {
    background: rgba(55, 55, 55, .98) !important;
    color: #fff !important;
}
.syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 3px !important;
}
@media (max-width: 768px) {
    .syt-lightbox-overlay .syt-lightbox-content > button.syt-lightbox-close {
        top: -40px !important;
        right: 0 !important;
    }
}

/* Grid Pagination Default Styles */
.syt-grid-pagination {
    text-align: center;
    margin-top: 30px;
}
.syt-page-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 5px;
    cursor: pointer;
    padding: 5px 12px;
    background: #eee;
    color: #333;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    user-select: none;
    border: 0;
    font-family: inherit;
}
.syt-page-dot:hover:not(.disabled) {
    background: #ddd;
}
.syt-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: inherit;
    font: inherit;
    user-select: none;
}
.syt-page-dot.active {
    background: #ff0000;
    color: #fff;
}
.syt-page-dot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Motorcycle Showroom design preset */
.syt-preset-motorcycle {
    box-sizing: border-box;
    width: 100%;
    background: #000;
    color: #fff;
}

.syt-preset-motorcycle .syt-brand-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto 28px;
    padding: 0 12px;
}

.syt-preset-motorcycle .syt-brand-filter-button {
    appearance: none;
    min-height: 44px;
    padding: 10px 27px;
    border: 1px solid #b7b7b7;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.syt-preset-motorcycle .syt-brand-filter-button:hover,
.syt-preset-motorcycle .syt-brand-filter-button.is-active {
    border-color: #e7192d;
    background: #e7192d;
    color: #fff;
}

.syt-preset-motorcycle .syt-grid-container {
    gap: 14px;
}

.syt-preset-motorcycle .syt-video-item {
    border: 1px solid #292929;
    border-radius: 22px;
    background: #101010;
    box-shadow: 0 5px 18px rgba(255, 255, 255, .035);
}

.syt-preset-motorcycle .syt-video-item a,
.syt-preset-motorcycle .syt-video-item .syt-playing {
    color: #fff;
}

.syt-preset-motorcycle .syt-thumbnail {
    overflow: hidden;
}

.syt-preset-motorcycle .syt-video-content {
    padding: 12px 14px 16px;
}

.syt-preset-motorcycle .syt-video-title {
    color: #f4f4f4;
    font-size: clamp(16px, 1.55vw, 22px);
    font-weight: 700;
    line-height: 1.5;
}

.syt-preset-motorcycle .syt-video-desc {
    color: #b8b8b8;
}

.syt-preset-motorcycle .syt-video-meta {
    gap: 8px;
    margin-top: 12px;
}

.syt-preset-motorcycle .syt-video-meta-item {
    min-height: clamp(30px, 4vw, 42px);
    padding: clamp(5px, .9vw, 9px) clamp(12px, 1.7vw, 20px);
    background: #252525;
    color: #d8d8d8;
    font-size: clamp(13px, 1.5vw, 18px);
}

.syt-preset-motorcycle .syt-page-dot {
    border: 1px solid #444;
    border-radius: 999px;
    background: #111;
    color: #fff;
}

.syt-preset-motorcycle .syt-page-dot.active,
.syt-preset-motorcycle .syt-page-dot:hover:not(:disabled) {
    border-color: #e7192d;
    background: #e7192d;
    color: #fff;
}

@media (max-width: 767px) {
    .syt-preset-motorcycle .syt-brand-filter {
        gap: 8px;
        margin-bottom: 20px;
    }

    .syt-preset-motorcycle .syt-brand-filter-button {
        min-height: 40px;
        padding: 9px 18px;
        font-size: 12px;
    }

    .syt-preset-motorcycle .syt-video-content {
        padding: 10px 12px 14px;
    }

    .syt-preset-motorcycle .syt-video-title {
        font-size: 14px;
    }
}
