/* YOUTUBE RELATED VIDEOS - ORIGINAL FORMAT STYLES */

.ytrv-related-videos {
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    max-width: 100%;
    overflow: hidden;
}

.ytrv-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 12px;
}

.ytrv-videos-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

/* REELS VERTICAL FORMAT (Mobile-first, vertical) */
.ytrv-reel-format {
    width: 100%;
    max-width: 100%;
    /* Mobile width */
    margin: 0 auto;
}

.ytrv-reel-wrapper {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: auto;
}

.ytrv-reel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.ytrv-reel-channel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ytrv-channel-icon {
    font-size: 14px;
}

.ytrv-channel-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.ytrv-reel-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ytrv-reel-tag {
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ytrv-reel-duration {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Vertical video container - Reel format */
.ytrv-reel-video {
    width: 100%;
    position: relative;
}

.ytrv-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%;
    /* 9:16 aspect ratio (vertical) */
    height: 0;
    overflow: hidden;
    background: #000;
}

.ytrv-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ytrv-reel-info {
    padding: 15px;
    background: white;
}

.ytrv-reel-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

.ytrv-reel-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.ytrv-reel-stats .ytrv-views {
    font-weight: 500;
}

/* NORMAL HORIZONTAL FORMAT */
.ytrv-normal-format {
    width: 100%;
    max-width: 100%;
}

.ytrv-normal-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    padding: 0;
}

/* Desktop layout for normal videos */
@media (min-width: 768px) {
    .ytrv-normal-wrapper {
        flex-direction: row;
        padding: 0;
    }
}

.ytrv-normal-thumbnail {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ytrv-normal-thumbnail {
        width: 360px;
        /* Fixed width for desktop */
    }
}

.ytrv-thumbnail-overlay {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio (horizontal) */
    height: 0;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.ytrv-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.ytrv-thumbnail-overlay:hover .ytrv-thumbnail-img {
    opacity: 0.9;
}

.ytrv-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytrv-play-button:hover {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.ytrv-video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.ytrv-normal-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .ytrv-normal-info {
        padding: 25px;
    }
}

.ytrv-normal-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.4;
    color: #333;
    font-weight: 600;
}

@media (min-width: 768px) {
    .ytrv-normal-title {
        font-size: 20px;
    }
}

.ytrv-normal-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .ytrv-normal-meta {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
}

.ytrv-normal-channel {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ytrv-normal-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.ytrv-normal-desc {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .ytrv-related-videos {
        margin: 30px 0;
        padding: 15px;
    }

    .ytrv-title {
        font-size: 1.3em;
    }

    .ytrv-reel-format {
        /* max-width: 300px; */
        max-width: 100%;
    }

    .ytrv-reel-header {
        padding: 10px 12px;
    }

    .ytrv-normal-thumbnail {
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }

    .ytrv-normal-info {
        padding: 15px;
    }
}

@media (min-width: 1200px) {
    .ytrv-reel-format {
        /* max-width: 400px; */
        max-width: 100%;
    }

    .ytrv-normal-thumbnail {
        width: 420px;
    }
}

/* Loading animation */
.ytrv-video-container iframe {
    transition: opacity 0.3s;
}

/* Mobile touch improvements */
@media (hover: none) {
    .ytrv-play-button {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* Admin Settings Page Styles */
.ytrv-status-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    color: #fff;
    background-color: #888;
}

.ytrv-status-badge.status-next {
    background-color: #2271b1; /* WordPress blue */
}

.ytrv-status-badge.status-exhausted {
    background-color: #d63638; /* WordPress red */
}

.ytrv-status-badge.status-available {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ytrv-status-badge.status-all-exhausted {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-weight: bold;
}


/* Add this to your existing CSS or create a new admin CSS file */
.button-danger {
    background-color: #d63638 !important;
    border-color: #d63638 !important;
    color: white !important;
}

.button-danger:hover {
    background-color: #b32d2e !important;
    border-color: #b32d2e !important;
}

.ytrv-warning-box {
    border: 2px solid #ffb900;
    background-color: #fff8e5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ytrv-warning-box h3 {
    color: #d63638;
    margin-top: 0;
}