/**
 * GoQueer Review Creator - Video Styles
 * Styles specific to video overview, feed, and modal pages
 *
 * @package GoQueer_Review_Creator
 * @since 1.2.0
 */

/* =====================================================
   Page-level horizontal scroll prevention
   ===================================================== */
.gqrc-videos-overview,
.gqrc-video-feed {
    max-width: 100vw;
    overflow: visible;
}

/* =====================================================
   Video Cards - Thumbnail Style (16:9 aspect ratio)
   ===================================================== */
.gqrc-videos-overview .gqrc-review-card,
.gqrc-video-feed .gqrc-review-card {
    flex: 0 0 300px;
    width: 300px;
    aspect-ratio: 16/9;
}

.gqrc-video-feed .gqrc-review-card {
    flex: 0 0 calc(20% - 12px);
    width: calc(20% - 12px);
    min-height: 150px;
}

/* Card inner absolute positioning for videos */
.gqrc-videos-overview .gqrc-card-inner,
.gqrc-video-feed .gqrc-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video badge position at bottom */
.gqrc-videos-overview .gqrc-card-badge,
.gqrc-video-feed .gqrc-card-badge {
    position: absolute;
    top: auto;
    bottom: 10px;
    right: 10px;
    height: auto;
    max-height: fit-content;
    align-self: flex-end;
    background: var(--gq-primary, #6962FE);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 5;
}

/* Video card title styling */
.gqrc-videos-overview .gqrc-card-title {
    font-size: 1.1rem;
}

/* Video card no-image icon */
.gqrc-videos-overview .gqrc-card-no-image::before,
.gqrc-video-feed .gqrc-card-no-image::before {
    content: '\f03d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* =====================================================
   Video Card Meta Badges
   ===================================================== */
.gqrc-card-meta-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.gqrc-card-meta-badge {
    font-size: 0.75rem;
    color: #fff;
    padding: 3px 8px;
    background: var(--gq-primary, #6962FE);
    border-radius: 3px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
    font-family: "Arvo", serif;
}

/* =====================================================
   Video Card Buttons
   ===================================================== */
.gqrc-videos-overview .gqrc-card-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gqrc-videos-overview .gqrc-card-btn {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(42,42,42,0.7);
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gqrc-videos-overview .gqrc-card-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: scale(1.1);
}

/* Play Button (Large) */
.gqrc-card-btn-play-large {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #000;
    border-color: #fff;
}

.gqrc-card-btn-play-large:hover {
    background: rgba(255,255,255,0.85);
}

.gqrc-card-btn-play-large i {
    font-size: 1rem;
    margin-left: 2px;
}

/* Small Action Buttons */
.gqrc-card-btn-add,
.gqrc-card-btn-like,
.gqrc-card-btn-expand {
    width: 32px;
    height: 32px;
}

.gqrc-card-btn-add i,
.gqrc-card-btn-like i,
.gqrc-card-btn-expand i {
    font-size: 0.85rem;
}

/* Expand button on the right */
.gqrc-card-btn-expand {
    margin-left: auto;
}

/* =====================================================
   Video Modal Layout
   ===================================================== */
/* Video Modal Layout - Same structure as review, with video-specific proportions */
.gqrc-video-content .gqrc-modal-content-wrapper {
    align-items: flex-start;
}

.gqrc-video-content .gqrc-modal-video-container {
    flex: 0 0 65%;
    width: 65%;
}

.gqrc-video-content .gqrc-modal-details {
    flex: 0 0 35%;
    max-width: 35%;
    width: 35%;
}

.gqrc-video-content .gqrc-modal-video-wrapper {
    width: 100%;
}

/* Video Unavailable Message (hidden by default, shown via JS when video fails to load) */
.gqrc-modal-video-wrapper .gqrc-video-unavailable {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    display: none !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    gap: 15px;
    z-index: 3;
}

.gqrc-modal-video-wrapper iframe {
    z-index: 2;
}

.gqrc-video-unavailable i {
    font-size: 3rem;
    opacity: 0.5;
    color: var(--gqrc-accent-color, #9b59b6);
}

.gqrc-video-unavailable p {
    font-size: 1rem;
    font-family: "Arvo", serif;
    margin: 0;
    padding: 0 20px;
}

/* =====================================================
   Video Timeline
   ===================================================== */
.gqrc-video-timeline-wrapper {
    margin-top: 25px;
}

.gqrc-timeline-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gqrc-primary-color, #006aff);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gqrc-timeline-title i {
    color: var(--gqrc-accent-color, #9b59b6);
}

.gqrc-video-timeline-container {
    position: relative;
    padding: 30px 0;
    overflow-x: auto;
    overflow-y: visible;
}

.gqrc-video-timeline-container::-webkit-scrollbar {
    height: 8px;
}

.gqrc-video-timeline-container::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.gqrc-video-timeline-container::-webkit-scrollbar-thumb {
    background: var(--gqrc-accent-color, #9b59b6);
    border-radius: 4px;
}

.gqrc-timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gqrc-accent-color, #9b59b6) 0%, var(--gqrc-primary-color, #006aff) 100%);
    transform: translateY(-50%);
    z-index: 1;
}

.gqrc-video-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    min-width: max-content;
    padding: 0 20px;
    z-index: 2;
}

.gqrc-timeline-point {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 15px;
}

.gqrc-point-marker {
    position: relative;
    width: 16px;
    height: 16px;
    background: var(--gqrc-accent-color, #9b59b6);
    border: 3px solid #181818;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
}

.gqrc-timeline-point:hover .gqrc-point-marker {
    width: 20px;
    height: 20px;
    background: var(--gqrc-primary-color, #006aff);
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.2);
}

.gqrc-point-content {
    position: absolute;
    top: 30px;
    min-width: 180px;
    max-width: 200px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.gqrc-timeline-point:hover .gqrc-point-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.gqrc-point-time {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gqrc-primary-color, #006aff);
    margin-bottom: 6px;
}

.gqrc-point-desc {
    font-size: 0.85rem;
    color: #e0e0e0;
    line-height: 1.4;
}

.gqrc-timeline-point:hover .gqrc-point-desc {
    color: #fff;
}

/* =====================================================
   Video Modal Details (Sidebar)
   ===================================================== */
.gqrc-video-content .gqrc-modal-details {
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    padding-right: 10px;
}

.gqrc-video-content .gqrc-section-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--gqrc-primary-color, #006aff);
    text-transform: lowercase;
    font-weight: 600;
    font-family: "Arvo", serif;
}

.gqrc-video-content .gqrc-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #e0e0e0;
    font-family: "Arvo", serif;
}

/* Timeline List in Sidebar */
.gqrc-timeline {
    margin: 0 0 20px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gqrc-timeline + .gqrc-section-title,
.gqrc-section-title + .gqrc-timeline {
    margin-top: 30px;
}

.gqrc-timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.gqrc-timeline-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--gqrc-accent-color, #9b59b6);
}

.gqrc-timeline-time {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    color: var(--gqrc-primary-color, #006aff);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: monospace;
}

.gqrc-timeline-time i {
    color: var(--gqrc-accent-color, #9b59b6);
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.gqrc-timeline-item:hover .gqrc-timeline-time i {
    opacity: 1;
    transform: scale(1.1);
}

.gqrc-timeline-desc {
    flex: 1;
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: "Arvo", serif;
}

.gqrc-timeline-item:hover .gqrc-timeline-desc {
    color: #fff;
}

/* Compact Meta Grid */
.gqrc-meta-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.gqrc-meta-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: "Arvo", serif;
}

.gqrc-meta-compact i {
    color: var(--gqrc-accent-color, #9b59b6);
    font-size: 1rem;
}

.gqrc-meta-compact span {
    color: #e0e0e0;
}

/* =====================================================
   Video Feed Specific
   ===================================================== */
.gqrc-video-feed .gqrc-cards-row {
    overflow: visible;
    padding: 50px 0 0 0;
    margin: -50px 0 0 0;
}

.gqrc-video-feed .gqrc-scroll-left {
    left: -45px;
}

.gqrc-video-feed .gqrc-scroll-right {
    right: -45px;
}

/* =====================================================
   Single Video Post View
   ===================================================== */
.gqrc-single-video #secondary,
.gqrc-single-video .sidebar,
.gqrc-single-video aside,
.gqrc-single-video .page-header,
.gqrc-single-video #comments {
    display: none !important;
}

.gqrc-single-video {
    background: #1a1a1a !important;
}

/* Single post view - same classes as modal but inline */
.gqrc-modal-overlay.gqrc-single-post-view {
    position: relative !important;
    display: block !important;
    z-index: auto !important;
    background: #181818;
    border-radius: 12px;
}

.gqrc-single-post-view .gqrc-modal-content {
    overflow: visible !important;
    height: auto !important;
    max-width: 100%;
    padding: 0;
}

.gqrc-single-post-view .gqrc-modal-body {
    overflow: visible !important;
    min-height: auto !important;
}

.gqrc-single-post-view .gqrc-modal-main-container {
    padding: 20px 20px 40px !important;
}

.gqrc-single-post-view .gqrc-modal-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.gqrc-single-post-view .gqrc-modal-close,
.gqrc-single-post-view .gqrc-back-button,
.gqrc-single-post-view .gqrc-back-overlay,
.gqrc-single-post-view .gqrc-edit-button {
    display: none !important;
}

/* Make iframe visible on single post view */
.gqrc-single-post-view .gqrc-modal-video-wrapper iframe {
    opacity: 1 !important;
}

/* Modal Title */
.gqrc-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px 0;
    font-family: "Arvo", serif;
    text-transform: lowercase;
}

/* Video wrapper for iframe */
.gqrc-modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.gqrc-modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Single video post layout */

.gqrc-single-post-view .gqrc-video-content .gqrc-modal-video-container {
    flex: 0 0 65% !important;
    width: 65% !important;
}

.gqrc-single-post-view .gqrc-video-content .gqrc-modal-details {
    flex: 0 0 35% !important;
    width: 35% !important;
    max-width: 35% !important;
}

/* =====================================================
   Responsive - Video Specific
   ===================================================== */
@media (max-width: 1200px) {
    .gqrc-videos-overview .gqrc-review-card {
        flex: 0 0 250px;
        width: 250px;
    }

    .gqrc-videos-overview .gqrc-review-card:hover {
        transform: scale(1.015);
    }

    .gqrc-video-feed .gqrc-review-card {
        flex: 0 0 250px;
        width: 250px;
    }

    .gqrc-video-feed .gqrc-review-card:hover {
        transform: scale(1.015);
    }
}

@media (max-width: 900px) {
    .gqrc-videos-overview .gqrc-review-card,
    .gqrc-video-feed .gqrc-review-card {
        flex: 0 0 220px;
        width: 220px;
    }

    .gqrc-videos-overview .gqrc-review-card:hover,
    .gqrc-video-feed .gqrc-review-card:hover {
        transform: scale(1.01);
    }

    .gqrc-video-content .gqrc-modal-content-wrapper {
        flex-direction: column;
    }

    .gqrc-video-content .gqrc-modal-video-container,
    .gqrc-video-content .gqrc-modal-details {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .gqrc-video-content .gqrc-modal-details {
        position: static;
    }

    .gqrc-timeline-point {
        padding: 0 10px;
    }

    .gqrc-point-content {
        min-width: 150px;
        max-width: 170px;
    }
}

@media (max-width: 600px) {
    .gqrc-videos-overview .gqrc-review-card,
    .gqrc-video-feed .gqrc-review-card {
        flex: 0 0 180px;
        width: 180px;
    }

    .gqrc-videos-overview .gqrc-review-card:hover,
    .gqrc-video-feed .gqrc-review-card:hover {
        transform: scale(1.005);
    }

    .gqrc-card-btn-play-large {
        width: 35px;
        height: 35px;
    }

    .gqrc-card-btn-add,
    .gqrc-card-btn-like,
    .gqrc-card-btn-expand {
        width: 28px;
        height: 28px;
    }

    .gqrc-video-meta {
        font-size: 0.85rem;
    }

    .gqrc-youtube-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
