/* ==========================================================================
   1. SEARCH BAR STYLING
   ========================================================================== */

/* External container reset */
div[id*="ajaxsearchlite"].asl_w,
div[id*="ajaxsearchlite"].asl_m {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 200px !important;
}

/* Actual search box */
div[id*="ajaxsearchlite"].asl_m .probox {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 50px !important;
    height: 40px !important;
    padding: 0 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: none !important;
}

/* Inner box wrapping the input */
div[id*="ajaxsearchlite"].asl_m .probox .proinput {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
}

/* Text input field (text color & blinking cursor fix) */
div[id*="ajaxsearchlite"].asl_m .probox input.orig,
div[id*="ajaxsearchlite"].asl_m .probox input.orig:focus,
div[id*="ajaxsearchlite"].asl_m .probox input.orig:active {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important; /* Prevents theme from making text transparent */
    caret-color: #000000 !important;             /* Restores blinking cursor in black */

    font-size: 16px !important;
    background: transparent !important;

    /* Block theme's blue underline and shadow interference */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    line-height: normal !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-indent: 0 !important; /* Prevents text from being nudged out of view */
}

div[id*="ajaxsearchlite"].asl_m .probox input.orig::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}

/* Close (X) button */
div[id*="ajaxsearchlite"].asl_m .probox .proclose {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 10px 0 0 !important;
    width: 20px !important;
    height: 20px !important;
}

div[id*="ajaxsearchlite"].asl_m .probox .proclose * {
    background: transparent !important;
}

div[id*="ajaxsearchlite"].asl_m .probox .proclose svg {
    fill: #999999 !important;
    width: 12px !important;
    height: 12px !important;
    display: block !important;
    margin: 4px auto !important;
}

/* Magnifier icon container */
div[id*="ajaxsearchlite"].asl_m .probox .promagnifier {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: auto 0 auto 0px !important;
    width: 24px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Magnifier SVG icon */
div[id*="ajaxsearchlite"].asl_m .probox .promagnifier svg {
    fill: #000000 !important;
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    top: auto !important;
    transform: translate(1px, 9px) !important; /* Fine-tune vertical alignment */
}

/* Search results dropdown */
div[id*="ajaxsearchlite"].asl_r {
    margin-top: 15px !important;
    min-width: 450px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

div[id*="ajaxsearchlite"].asl_r .item {
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 15px !important;
    display: flex !important;
    align-items: flex-start !important;
}

div[id*="ajaxsearchlite"].asl_r .item .asin {
    width: 70px !important;
    height: 105px !important;
    min-width: 70px !important;
    min-height: 105px !important;
    flex-shrink: 0 !important;
    margin-right: 15px !important;
    border-radius: 4px !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

div[id*="ajaxsearchlite"].asl_r .item:hover {
    background: #f9f9f9 !important;
}

div[id*="ajaxsearchlite"] form input.autocomplete {
    display: none !important;
}


/* ==========================================================================
   2. FILTER BAR STYLING
   ========================================================================== */

form.search-form,
.archive-header-filters,
.filter-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    margin-bottom: 30px !important;
    width: 100% !important;
}

select,
.post-filter-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 40px 0 20px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #333 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    width: auto !important;
    min-width: 180px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23E50914" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    transition: all 0.3s ease !important;
}

select:hover,
.post-filter-select:hover {
    border-color: #E50914 !important;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.15) !important;
    transform: translateY(-2px) !important;
}

select:focus {
    outline: none !important;
    border-color: #E50914 !important;
}


/* ==========================================================================
   3. REVIEW CARD STYLING
   ========================================================================== */

.rt-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin-bottom: 40px;
    max-width: 100%;
    background-color: transparent;
}

.rt-top-row {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.rt-poster-col {
    flex: 0 0 180px;
}

.rt-poster-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rt-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rt-title {
    margin-top: 0;
    line-height: 1.1;
    margin-bottom: 15px;
    font-size: 2.4rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.5px;
}

.rt-scores {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.rt-score-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-circle,
.audience-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.score-circle.fresh  { background-color: #FA320A; }
.score-circle.rotten { background-color: #5F9E3F; }
.audience-badge      { background-color: #E50914; border-radius: 4px; }

.rt-label {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.rt-label strong {
    color: #000;
    font-size: 1rem;
    margin-bottom: 2px;
}

.rt-synopsis-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #E50914;
    margin-bottom: 8px;
}

.rt-plot-text {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.7;
}

.rt-toggle-btn {
    color: #E50914;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 5px;
}

.rt-toggle-btn:hover {
    text-decoration: underline;
    color: #b20710;
}

.content-guide-box {
    margin-top: 30px;
    background: #fff;
    padding: 30px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.guide-title {
    margin-top: 0;
    font-size: 1.4rem;
    border-bottom: 2px solid #E50914;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #000;
    font-weight: 700;
}

.guide-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.guide-header-row,
.guide-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 20px;
}

.guide-header-row {
    margin-left: 130px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: #999;
    font-size: 0.75rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.guide-label {
    font-weight: 700;
    color: #444;
    text-align: right;
    font-size: 0.9rem;
}

.guide-track {
    position: relative;
    height: 6px;
    background: #eee;
    border-radius: 10px;
    width: 100%;
}

.guide-dot {
    position: absolute;
    top: -5px;
    width: 16px;
    height: 16px;
    background: #E50914;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.movie-review-container {
    max-width: 100%;
    margin-top: 40px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
}

.content-analysis-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 40px;
}

.analysis-heading {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: 800;
    color: #E50914;
    margin-bottom: 15px;
    font-family: 'Helvetica Neue', sans-serif;
}

.praise-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.praise-box {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #E50914;
}


/* ==========================================================================
   4. PLAY BUTTON (Red Circle)
   ========================================================================== */

.video-play-button,
.play-icon,
.wp-block-video .vjs-big-play-button,
.mejs-overlay-button,
.plyr__control--overlaid {
    background-color: #E50914 !important;
    border-color: #E50914 !important;
    opacity: 0.9 !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.video-play-button:hover,
.play-icon:hover {
    background-color: #b20710 !important;
}

.video-play-button svg,
.video-play-button path,
.play-icon svg,
.play-icon path {
    fill: #ffffff !important;
    color: #ffffff !important;
}


/* ==========================================================================
   5. RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .rt-top-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rt-poster-col {
        width: 160px;
        margin-bottom: 20px;
    }

    .rt-info-col {
        width: 100%;
        align-items: center;
    }

    .rt-scores {
        justify-content: center;
    }

    .rt-plot-text {
        text-align: left;
    }

    .guide-header-row {
        display: none;
    }

    .guide-row {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }

    .guide-label {
        font-size: 0.8rem;
    }

    .praise-container {
        flex-direction: column;
    }

    form.search-form,
    .archive-header-filters {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    select {
        width: 100% !important;
    }
}


/* ==========================================================================
   6. UTILITY — HIDE UNWANTED WP ELEMENTS
   ========================================================================== */

.single-movie .comments-area,
.single-tv_show .comments-area,
.single-movie .post-navigation,
.single-tv_show .post-navigation,
.single-movie .ast-post-navigation,
.single-tv_show .ast-post-navigation {
    display: none !important;
}

.single-movie .review-box,
.single-tv_show .review-box,
.single-movie .community-reviews-section,
.single-tv_show .community-reviews-section {
    display: block !important;
    visibility: visible !important;
}
