/*
Theme Name: Newspaper Child
Template: Newspaper
Theme URI: https://theanalytica.in
Description: Child theme for Newspaper by Cybernob Technologies
Author: Cybernob Technologies
Version: 1.0
*/
/* ==========================================================================
   THE ANALYTICA — POLLS PAGE STYLING
   Add this to your Newspaper child theme's style.css (or a custom CSS file
   enqueued after YOP Poll's own stylesheet, so these rules take priority).

   IMPORTANT: Replace the accent color below with your Newspaper
   Theme Panel -> Layout -> Colors -> Accent Color hex value.
   ========================================================================== */
:root {
  --accent-color: #fff;
  --reel-news-white: #FFFFFF;
  --reel-news-black: #000000;
  --reel-news-accent: #312DA1;
  --reel-news-light-grey: #000 !important;
  --reel-news-black-transparent: rgba(0,0,0,0.85);
  --reel-news-red: #ff0000;
  --reel-news-dark-gray: #313131;
  --reel-news-transparent:#fff !important;
}
:root {
    --analytica-accent: #2E86DE;      /* <-- swap with your real accent hex */
    --analytica-accent-dark: #1B5FA8;
    --analytica-text: #262626;
    --analytica-muted: #767676;
    --analytica-border: #e5e5e5;
    --analytica-bg-card: #ffffff;
}
/*** For megamenu titles ****/
.tdi_24 .block-mega-child-cats a {
    color: #fff !important;
}
    
/* ---- Page top spacing (clears Newspaper's sticky/fixed header) ---- */
#tdi_polls_wrapper {
    padding-top: 50px;
}
.tdi_81 .td-excerpt {
  
  color: #000 !important;
  
}

/* ---- Page header ---- */
.tdb-polls-header {
    margin: 0 0 25px;
    text-align: center;
}
.tdb-polls-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--analytica-text);
    margin-bottom: 8px;
}
.tdb-polls-subtitle {
    color: var(--analytica-muted);
    font-size: 1em;
}

/* ---- Poll card shell (mimics td-block module look) ---- */
.tdb-poll-card {
    position: relative;
    background: var(--analytica-bg-card);
    border: 1px solid var(--analytica-border);
    border-radius: 4px;
    padding: 40px 44px 40px;
    margin-bottom: 36px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.tdb-poll-card--featured {
    border-top: 3px solid var(--analytica-accent);
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
}
.tdb-poll-card__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--analytica-accent);
    padding: 6px 14px;
    border-radius: 3px;
    margin-bottom: 28px;
}
.tdb-poll-card__label--closed {
    background: #999;
}

/* ---- Empty state (no active poll) ---- */
.tdb-polls-empty {
    text-align: center;
    color: var(--analytica-muted);
    font-size: 1em;
    padding: 30px 0;
}

/* ---- Archive: space out each closed poll inside the auto-generated group ---- */
.tdb-polls-archive__group .yop-poll-container {
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--analytica-border);
}
.tdb-polls-archive__group .yop-poll-container:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ---- Archive section ---- */
.tdb-polls-archive__heading {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--analytica-text);
    margin: 10px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--analytica-border);
}
.tdb-polls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
/* The archive now renders as ONE auto-generated group (via [yop_poll_archive]),
   not multiple individual .tdb-poll-card elements, so it should take full width
   rather than the old 50%-split grid layout. */
.tdb-polls-grid .tdb-polls-archive__group {
    flex: 1 1 100%;
    margin-bottom: 0;
}

/* ==========================================================================
   YOP POLL — OVERRIDE DEFAULT PLUGIN STYLING
   These target YOP Poll's default markup classes so results look like thin
   ranking bars instead of the plugin's default chunky bars.
   ========================================================================== */

/* Question text */
.yop-poll-container .yop-poll-question .yop-poll-questiontext,
.yop-poll-container .yop-poll-question {
    font-size: 1.15em;
    font-weight: 600;
    color: var(--analytica-text);
    margin-bottom: 24px;
    padding: 0;
}

/* Answer option row (pre-vote state) */
.yop-poll-container .yop-poll-answers .yop-poll-answer,
.yop-poll-container .yop-poll-answers > * {
    padding: 16px 20px;
    border: 1px solid var(--analytica-border);
    border-radius: 4px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.yop-poll-container .yop-poll-answers .yop-poll-answer:hover {
    border-color: var(--analytica-accent);
    background: rgba(46, 134, 222, 0.04);
}

/* Vote button — targets the actual HTML element (button / input) rather
   than guessing YOP Poll's internal class name, so this works regardless
   of plugin version. Reset browser default appearance first, then apply
   our styling. */
.yop-poll-container button,
.yop-poll-container input[type="submit"],
.yop-poll-container input[type="button"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: var(--analytica-accent) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 4px !important;
    padding: 14px 34px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    margin-top: 16px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}
.yop-poll-container button:hover,
.yop-poll-container input[type="submit"]:hover,
.yop-poll-container input[type="button"]:hover {
    background: var(--analytica-accent-dark) !important;
}

/* Results bars — thin ranking-style bar with % on the right */
.yop-poll-container .yop-poll-results .yop-poll-results-answer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.92em;
    color: var(--analytica-text);
}
.yop-poll-container .yop-poll-results .yop-poll-results-bar {
    height: 6px !important;
    border-radius: 3px;
    background: var(--analytica-accent) !important;
}
.yop-poll-container .yop-poll-results .yop-poll-results-bar-container {
    background: #f0f0f0 !important;
    border-radius: 3px;
    height: 6px !important;
    flex: 1;
    margin: 0 12px;
}
.yop-poll-container .yop-poll-results .yop-poll-results-percentage {
    font-weight: 700;
    color: var(--analytica-accent);
    min-width: 42px;
    text-align: right;
}

/* Total votes footer text */
.yop-poll-container .yop-poll-total-votes {
    color: var(--analytica-muted);
    font-size: 0.85em;
    margin-top: 14px;
}

/* ==========================================================================
   MOBILE (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {
    #tdi_polls_wrapper {
        padding-top: 30px;
    }
    .tdb-polls-title {
        font-size: 1.6em;
    }
    .tdb-polls-subtitle {
        font-size: 0.9em;
        padding: 0 10px;
    }
    .tdb-polls-grid .tdb-polls-archive__group {
        margin-bottom: 0;
    }
    .tdb-poll-card {
        padding: 26px 22px 26px;
        margin-bottom: 24px;
    }
    .tdb-poll-card__label {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 18px;
    }
    .tdb-polls-archive__heading {
        font-size: 1.15em;
    }

    /* Poll question — slightly smaller so it doesn't wrap awkwardly */
    .yop-poll-container .yop-poll-question .yop-poll-questiontext {
        font-size: 1.05em;
        line-height: 1.4;
    }

    /* Larger tap targets for answer rows on touch screens */
    .yop-poll-container .yop-poll-answers .yop-poll-answer {
        padding: 14px 16px;
        font-size: 0.95em;
    }

    /* Full-width vote button, easier to tap with a thumb */
    .yop-poll-container button,
    .yop-poll-container input[type="submit"],
    .yop-poll-container input[type="button"] {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 13px !important;
    }

    /* Results: let the answer label wrap, keep bar+% aligned */
    .yop-poll-container .yop-poll-results .yop-poll-results-answer {
        flex-wrap: wrap;
        font-size: 0.88em;
    }
    .yop-poll-container .yop-poll-results .yop-poll-results-bar-container {
        margin: 6px 0;
        flex-basis: 100%;
    }
    .yop-poll-container .yop-poll-results .yop-poll-results-percentage {
        min-width: auto;
    }

    /* Archive: reduce spacing between stacked closed polls */
    .tdb-polls-archive__group .yop-poll-container {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

/* ==========================================================================
   SMALL PHONES (max-width: 380px)
   ========================================================================== */
@media (max-width: 380px) {
    .tdb-polls-title {
        font-size: 1.35em;
    }
    .tdb-poll-card {
        padding: 16px 14px 16px;
    }
    .yop-poll-container .yop-poll-question .yop-poll-questiontext {
        font-size: 0.98em;
    }
}