/**
 * YouTube Shorts Enhancement Styles
 */

/* YouTube Shorts container */
.youtube-shorts-container {
    max-width: 400px;
    margin: 0 auto !important;
    position: relative;
}

/* Wrapper for YouTube Shorts */
.youtube-shorts-container .fluid-width-video-wrapper {
    padding-top: 177.77% !important; /* 9:16 aspect ratio */
    /* border-radius: 12px; */
    overflow: hidden;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    position: relative;
}

/* Phone frame styling for desktop */
@media screen and (min-width: 768px) {
    .youtube-shorts-container {
        padding: 20px 0;
    }
  
    .shorts-desktop-frame {
        /* border: 10px solid #000;
        border-radius: 20px;
        box-shadow: 0 0 0 1px #666, 0 5px 25px rgba(0, 0, 0, 0.3);
        position: relative;
        overflow: hidden; */
    }
  
    /* Notch for phone styling */
    .shorts-desktop-frame:before {
        /* content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 15px;
        background-color: #000;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        z-index: 10; */
    }
}

/* Specific modification for the YouTube widget */
.youtube--widget .youtube-shorts-container {
    margin: 0 auto !important;
    display: block;
}

/* Shorts indicator */
.shorts-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 100;
    text-transform: uppercase;
}

/* Media queries for responsiveness */
@media screen and (max-width: 767px) {
    .youtube-shorts-container {
        max-width: 100%;
    }
    
    .shorts-indicator {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .youtube-shorts-container .fluid-width-video-wrapper {
        border-radius: 0;
    }
}

/* Specific styles for iPad/tablet */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .youtube-shorts-container {
        max-width: 320px;
    }
}

/* Use attribute to flag YouTube Shorts in admin */
[data-video-type="shorts"] {
    outline: 2px dashed #ff0000;
}

/* Make sure shorts are properly sized even without FitVids */
.youtube-shorts-iframe {
    width: 100%;
    aspect-ratio: 9/16;
}

/* YouTube Shorts controls enhancement */
.youtube-shorts-player-controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.youtube-shorts-player-controls button {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.youtube-shorts-player-controls button:hover {
    background: #e8e8e8;
    transform: scale(1.05);
}

/* Add swipe indicator for mobile */
@media screen and (max-width: 767px) {
    .youtube-shorts-container::after {
        content: "⇡ Swipe ⇣";
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 12px;
        opacity: 0.7;
        pointer-events: none;
        animation: fadeOut 2s forwards 3s;
        z-index: 100;
    }
    
    @keyframes fadeOut {
        from { opacity: 0.7; }
        to { opacity: 0; }
    }
}
