/**
 * GoQueer Review Creator - Review Styles
 * Styles specific to review overview and detail pages
 *
 * @package GoQueer_Review_Creator
 * @since 1.2.0
 */

/* =====================================================
   Review Cards - Poster Style (2:3 aspect ratio)
   ===================================================== */
.gqrc-overview-container .gqrc-review-card {
    flex: 0 0 200px;
    width: 200px;
    aspect-ratio: 2/3;
}

@media (max-width: 900px) {
    .gqrc-overview-container .gqrc-review-card {
        flex: 0 0 150px;
        width: 150px;
    }

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

@media (max-width: 600px) {
    .gqrc-overview-container .gqrc-review-card {
        flex: 0 0 120px;
        width: 120px;
    }

    .gqrc-overview-container .gqrc-review-card:hover {
        transform: scale(1.005);
    }
}

/* =====================================================
   Single Review Container
   ===================================================== */
.gqrc-container {
    max-width: 1100px;
    margin: 0 auto;
    font-family: "Arvo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gqrc-content-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.gqrc-poster-section img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gqrc-info-section {
    display: flex;
    flex-direction: column;
}

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

.gqrc-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #333;
    white-space: pre-line;
}

.gqrc-description p {
    margin-bottom: 1em;
    white-space: pre-line;
}

.gqrc-description p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   Meta Grid (Technical Data)
   ===================================================== */
.gqrc-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 25%);
    gap: 20px;
    margin-bottom: 30px;
}

.gqrc-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gqrc-meta-icon {
    width: 38px;
    height: 38px;
    background: var(--gqrc-accent-color, #9b59b6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1rem;
}

.gqrc-meta-icon i {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.gqrc-fsk-icon {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gqrc-meta-content h6 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

.gqrc-meta-content p {
    font-size: 0.95rem;
    color: #666;
}

/* =====================================================
   Rating Box
   ===================================================== */
.gqrc-rating-box {
    margin-top: auto;
}

.gqrc-rating-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.gqrc-stars-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   Review Video Section
   ===================================================== */
.gqrc-review-section {
    margin-top: 50px;
}

.gqrc-review-title {
    font-size: 2rem;
    color: var(--gqrc-primary-color, #006aff);
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: lowercase;
}

.gqrc-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

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

.gqrc-copyright {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.gqrc-copyright-icon {
    width: 35px;
    height: 35px;
    background: var(--gqrc-accent-color, #9b59b6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* =====================================================
   Modal - Review Specific
   ===================================================== */
.gqrc-modal-video-container {
    flex: 0 0 55%;
    width: 55%;
}

.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%;
}

/* Streaming Sources */
.gqrc-sources-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.gqrc-sources-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gqrc-sources-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gqrc-source-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #9b59b6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gqrc-source-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
    color: #fff;
}

.gqrc-source-button i {
    font-size: 1.2rem;
}

.gqrc-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #9b59b6;
    color: #fff;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
    cursor: default;
}

.gqrc-source-badge i {
    font-size: 1.2rem;
}

/* Modal Details Panel */
.gqrc-modal-details {
    overflow: visible;
}

.gqrc-modal-details .gqrc-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.gqrc-modal-details .gqrc-content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.gqrc-modal-details .gqrc-poster-section {
    display: none;
}

.gqrc-modal-details .gqrc-section-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.gqrc-modal-details .gqrc-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.gqrc-modal-details .gqrc-meta-grid {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 0;
}

.gqrc-modal-details .gqrc-meta-item {
    gap: 10px;
}

.gqrc-modal-details .gqrc-meta-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.gqrc-modal-details .gqrc-meta-content h6 {
    color: #fff;
    font-size: 0.9rem;
}

.gqrc-modal-details .gqrc-meta-content p {
    color: #ccc;
    font-size: 0.9rem;
}

.gqrc-modal-details .gqrc-rating-box {
    margin-top: 20px;
}

.gqrc-modal-details .gqrc-rating-title {
    color: #fff;
}

/* =====================================================
   Back Button Overlay
   ===================================================== */
.gqrc-back-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    animation: gqrcFadeIn 0.5s ease;
}

@keyframes gqrcFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gqrc-back-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(20, 20, 20, 0.85);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gqrc-back-button:hover {
    background: rgba(0, 106, 255, 0.9);
    color: #fff;
    transform: translateX(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 106, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.gqrc-back-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.gqrc-back-button:hover i {
    transform: translateX(-3px);
}

.gqrc-back-button span {
    white-space: nowrap;
}

/* Edit Button */
.gqrc-edit-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(155, 89, 182, 0.85);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}

.gqrc-edit-button:hover {
    background: rgba(155, 89, 182, 1);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.gqrc-edit-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.gqrc-edit-button:hover i {
    transform: rotate(15deg);
}

.gqrc-edit-button span {
    white-space: nowrap;
}

/* Back overlay with multiple buttons */
.gqrc-back-overlay {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* =====================================================
   Single Review Page Styles
   ===================================================== */
.gqrc-single-review {
    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;
}

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

.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-video-content .gqrc-modal-details {
    flex: 0 0 100% !important;
    width: 100% !important;
}

.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;
}

/* Hide sidebar, page header and comments on single review pages */
.gqrc-single-review #secondary,
.gqrc-single-review .sidebar,
.gqrc-single-review aside,
.gqrc-single-review .page-header,
.gqrc-single-review #comments {
    display: none !important;
}

/* Single review post layout */
.gqrc-single-post-view .gqrc-modal-details {
    flex: 0 0 45% !important;
    width: 45% !important;
    overflow: visible !important;
    padding-right: 40px !important;
    max-height: none !important;
    overflow-y: visible !important;
}

/* =====================================================
   Responsive - Review Specific
   ===================================================== */
@media (max-width: 1200px) {
    .gqrc-modal-content-wrapper {
        flex-direction: column;
    }

    .gqrc-modal-video-container {
        flex: 1;
        width: 100%;
    }

    .gqrc-modal-details {
        flex: 1;
        width: 100%;
        overflow: visible;
        padding-right: 0;
        padding-bottom: 40px;
    }

    .gqrc-sources-buttons {
        flex-direction: column;
    }

    .gqrc-source-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .gqrc-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gqrc-poster-section {
        max-width: 400px;
        margin: 0 auto;
    }

    .gqrc-meta-grid {
        grid-template-columns: repeat(2, 50%);
    }

    /* Back button responsive */
    .gqrc-back-overlay {
        bottom: 15px;
        left: 15px;
        flex-direction: column;
        align-items: flex-start;
    }

    .gqrc-back-button,
    .gqrc-edit-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .gqrc-edit-button {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 600px) {
    .gqrc-meta-grid {
        grid-template-columns: 1fr;
    }

    /* Compact back button on mobile */
    .gqrc-back-overlay {
        bottom: 10px;
        left: 10px;
    }

    .gqrc-back-button {
        padding: 10px 16px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .gqrc-back-button span {
        display: none;
    }

    .gqrc-back-button i {
        font-size: 1.2rem;
        margin: 0;
    }

    .gqrc-back-button {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
}

/* =====================================================
   Related Films Section - Modal
   Uses same card structure as review-home
   ===================================================== */
.gqrc-related-films {
    margin-top: 30px;
    padding: 25px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gqrc-related-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gqrc-accent-color, #61ff70);
    margin: 0 0 18px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: "Arvo", serif;
}

.gqrc-related-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--gqrc-accent-color, #61ff70) transparent;
}

.gqrc-related-scroll::-webkit-scrollbar {
    height: 4px;
}

.gqrc-related-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
}

.gqrc-related-scroll::-webkit-scrollbar-thumb {
    background: var(--gqrc-accent-color, #61ff70);
    border-radius: 2px;
}

/* Related cards - same as review-home but smaller */
.gqrc-related-scroll .gqrc-review-card {
    flex: 0 0 150px;
    width: 150px;
    aspect-ratio: 2/3;
}

.gqrc-related-scroll .gqrc-review-card:hover {
    transform: scale(1.025);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

/* Responsive adjustments for related films */
@media (max-width: 900px) {
    .gqrc-related-scroll .gqrc-review-card {
        flex: 0 0 130px;
        width: 130px;
    }

    .gqrc-related-scroll .gqrc-review-card:hover {
        transform: scale(1.015);
    }
}

@media (max-width: 600px) {
    .gqrc-related-films {
        padding: 20px 15px;
    }

    .gqrc-related-scroll {
        gap: 12px;
    }

    .gqrc-related-scroll .gqrc-review-card {
        flex: 0 0 110px;
        width: 110px;
    }

    .gqrc-related-scroll .gqrc-review-card:hover {
        transform: scale(1.005);
    }
}
