/* Lorry YouTube Embed Styles */

/* Carousel Wrapper */
.lye-carousel-wrapper {
    margin: 20px 0;
    max-width: 100%;
}

.lye-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lye-carousel-title {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.lye-carousel-nav {
    display: flex;
    gap: 8px;
}

/* Carousel Container */
.lye-carousel {
    position: relative;
    display: flex;
    align-items: center;
}

.lye-carousel-container {
    overflow: hidden;
    flex: 1;
    position: relative;
    width: 100%;
    cursor: grab;
    user-select: none;
}

.lye-carousel-container:active {
    cursor: grabbing;
}

.lye-carousel-track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
}

/* Carousel Items */
.lye-carousel-item {
    min-width: 280px;
    max-width: 280px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lye-carousel-item:hover {
    transform: scale(1.05);
}

/* Shorts Carousel Items - Smaller */
.lye-carousel[data-type="shorts"] .lye-carousel-item {
    min-width: 180px;
    max-width: 180px;
}

/* Shorts hover effect - no zoom */
.lye-carousel[data-type="shorts"] .lye-carousel-item:hover {
    transform: none;
}

.lye-carousel[data-type="shorts"] .lye-carousel-item:hover .lye-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.lye-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.lye-carousel[data-type="shorts"] .lye-thumbnail {
    padding-bottom: 177.78%; /* 9:16 aspect ratio for shorts */
}

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

.lye-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.lye-carousel-item:hover .lye-play-button {
    opacity: 1;
}

.lye-shorts-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Carousel Buttons */
.lye-carousel-btn {
    background: rgba(0, 0, 0, 0.7) !important;
    border: none !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.lye-carousel-btn svg {
    stroke: white !important;
    fill: none !important;
    width: 24px !important;
    height: 24px !important;
    display: block !important;
}

.lye-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
}

.lye-carousel-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.lye-carousel-btn:disabled svg {
    stroke: #999 !important;
}

/* Modal Overlay */
.lye-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lye-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Shorts Viewer Container */
.lye-shorts-viewer {
    position: relative;
    width: auto;
    aspect-ratio: 9 / 16;
    height: 90vh;
    max-height: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* Shorts Container - Scrollable */
.lye-shorts-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.lye-shorts-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Individual Short Item */
.lye-short-item {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #000;
}

.lye-short-item iframe,
.lye-short-item > div {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    pointer-events: auto;
}

.lye-short-item > div iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Viewer (for regular videos) */
.lye-video-viewer {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.lye-video-viewer iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Close Button */
.lye-video-viewer .lye-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10;
    transition: background 0.2s ease;
}

.lye-video-viewer .lye-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lye-shorts-viewer .lye-close-btn {
    position: absolute !important;
    top: 48px !important;
    right: 15px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: none !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    z-index: 10 !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    outline: none !important;
}

.lye-shorts-viewer .lye-close-btn svg {
    width: 24px !important;
    height: 24px !important;
    stroke: white !important;
    fill: none !important;
    display: block !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
}

.lye-shorts-viewer .lye-close-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
}


/* Loading State */
.lye-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lye-carousel-item {
        min-width: 220px;
        max-width: 220px;
    }

    .lye-shorts-viewer {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        aspect-ratio: auto;
    }

    .lye-video-viewer {
        width: 95%;
    }

    .lye-carousel-btn {
        width: 35px;
        height: 35px;
    }

   .lye-category-container {
    bottom: 25px !important;
   }
}

@media (max-width: 480px) {
    .lye-carousel-item {
        min-width: 180px;
        max-width: 180px;
    }

    .lye-carousel-btn {
        width: 30px;
        height: 30px;
    }

   .lye-category-container {
    bottom: 25px !important;
    }
}

/* Category Label on Shorts Player */
.lye-category-container {
    position: absolute !important;
    bottom: 10px;
    left: 15% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    width: auto !important;
    height: auto !important;
}

.lye-category-label {
    display: inline-block !important;
    background: rgba(0, 0, 0, 0.85) !important;
    color: white !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    border: solid orange;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    pointer-events: auto !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
}

a.lye-category-label:hover {
    color: #fff !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Simple Shorts Embed */
.lye-shorts-embed {
    margin: 20px auto;
    display: block;
}
