/* PolMachv2 Theme — Light political with patriotic blue accents */
/* Colors extracted from legacy PolMachv2 forums.scss — accent #012069 */
/* Section 1: Variable overrides */
.theme-polmachv2 {
    --accent-color: #012069;
    --accent-color-text: #FDFDFD;
    --background: #FDFDFD;
    --alternate-background: #EEF0F8;
    --text-color: #000000;
    --secondary-text-color: #9C9C9C;
    --table-text-color: #7D7D7D;
    --link-color: #012069;
    --border-color: #CACACC;
    --border-color-gradient: #313131;
    --header-background: #CCCCCC;
    --header-text-color: #2D2D2D;
    --menu-background: #000000;
    --menu-text-color: #FDFDFD;
    --section-header-background: #E3E4E5;
    --section-header-background-2: #FAFAFA;
    --section-header-background-3: linear-gradient(to bottom,#ffffff 0%,#e9e9e9 100%);
    --section-header-text-color: #2D2D2D;
    --body-background: #F6F6F6;
    --body-text-color: #2D2D2D;
    --nav-border-color: #012069;
    --error-background: #FFF4F4;
    --error-text-color: #620000;
    --error-border-color: #FF0000;
    --success-text-color: #009900;
    --message-background: #FFF8DF;
    --message-text-color: #996600;
    --message-border-color: #FFCA11;
    --post-quote-background: #DEE4F3;
    --post-quote-text-color: #2D2D2D;
    --post-quote-border-color: #8191C5;
    --post-quote-header-background: #C2CCE7;
    --post-quote-header-text-color: #012069;
    --search-highlight-text-color: #1BA5C7;
    --tooltip-background-color: #FDFDFD;
    --tooltip-border-color: #012069;
    --tooltip-color: #000000;
    --tooltip-highlight-color: #012069;
    --tooltip-de-emphasize-color: #8D8D8D;
    --table-header-background: transparent;
    --main-accent-color: #FDFDFD;
    --sub-alert-background-color: #012069;
    --sub-alert-text-color: #FDFDFD;
    --sub-alert-link-color: #FDFDFD;
}
    /* Section 2: Site header overrides */
    .theme-polmachv2 .sd-site-header {
        background: linear-gradient(to bottom,#E8E8E8 0%,#CCCCCC 100%);
        border-bottom-color: #A0A0B0;
    }

    .theme-polmachv2 .sd-site-title {
        color: var(--accent-color);
    }
    /* Section 3: Breadcrumb bar */
    .theme-polmachv2 .sd-breadcrumbs li:not(:last-child)::after {
        color: #B0B0B0;
    }
    /* Section 4: Forum listing rows */
    .theme-polmachv2 .sd-thread-item:hover,
    .theme-polmachv2 .sd-thread-item:nth-child(even):hover,
    .theme-polmachv2 .sd-category-row:hover,
    .theme-polmachv2 .sd-category-table tbody tr:nth-child(even):hover {
        background: rgba(1,32,105,.06);
    }
    /* Section 5: Thread group labels and section headers */


    .theme-polmachv2 .sd-thread-list-header {
        background: #F0F0F2;
    }
    /* Section 6: Post container headers — use base theme defaults */
    /* Section 7: Buttons and links */
    .theme-polmachv2 .sd-btn-primary {
        background-color: var(--accent-color);
        color: var(--accent-color-text);
    }

        .theme-polmachv2 .sd-btn-primary:hover {
            background-color: #011A55;
        }

    .theme-polmachv2 .sd-btn-secondary {
        border-color: var(--border-color);
        color: var(--body-text-color);
    }

        .theme-polmachv2 .sd-btn-secondary:hover {
            background: var(--alternate-background);
        }
    /* Section 8: Thread icon states */
    .theme-polmachv2 .sd-thread-icon--unread {
        color: var(--link-color);
    }

    .theme-polmachv2 .sd-thread-icon--read {
        color: #B0B0B0;
    }
    /* Section 9: Pagination */
    .theme-polmachv2 .sd-thread-tray__page-link {
        border-color: var(--border-color);
        color: var(--link-color);
    }

        .theme-polmachv2 .sd-thread-tray__page-link:hover {
            background: var(--accent-color);
            color: var(--accent-color-text);
        }
    /* Section 10: Sidebar */
    .theme-polmachv2 .sd-sidebar {
    }
    /* Section 11: Forum jump */
    .theme-polmachv2 .sd-forum-jump__select {
        border-color: var(--border-color);
        background: var(--background);
    }
    /* Section 12: Category rows (home page) — hover unified in Section 4 */
    .theme-polmachv2 .sd-category-header {
        background: linear-gradient(to bottom,#F5F5F5 0%,#E3E4E5 100%);
        color: var(--accent-color);
        border-bottom: 1px solid #D0D0D0;
    }
    /* Section 13: Moderators bar */
    .theme-polmachv2 .sd-moderators {
        background: #FAFAFA;
        border-top-color: #E0E0E0;
    }
    /* Section 14: Spoiler text */
    .theme-polmachv2 .spoiler {
        background: var(--text-color);
        color: var(--text-color);
    }

        .theme-polmachv2 .spoiler:hover, .theme-polmachv2 .spoiler.revealed {
            background: transparent;
            color: inherit;
        }
    /* Section 15: Quote blocks */
    .theme-polmachv2 .sd-quote {
        background: var(--post-quote-background);
        border-left: 3px solid var(--post-quote-border-color);
        padding: .5rem .75rem;
    }

    .theme-polmachv2 .sd-quote-header {
        background: var(--post-quote-header-background);
        color: var(--post-quote-header-text-color);
        padding: .25rem .5rem;
        font-size: .8rem;
        font-weight: 600;
    }

/* Content area background */
.theme-polmachv2 .sd-content-area {
    background: var(--body-background);
}

/* Section 16: Political Machine secondary header — red gradient nav bar
   shown below the default Stardock header on the politicalmachine.com site. */
.sd-polmach-nav {
    background: linear-gradient(180deg, #cd0404, #a60000);
    border-top: 1px solid #d5d5d5;
    border-bottom: 1px solid #d5d5d5;
    text-align: center;
    height: 50px;
    line-height: 50px;
}

.sd-polmach-nav ul {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 3px solid #d5d5d5;
    border-right: 3px solid #d5d5d5;
    height: 48px;
    overflow: hidden; /* Clip any li that would otherwise spill out (e.g. Purchase) */
    vertical-align: top;
}

.sd-polmach-nav > ul > li {
    display: inline-block;
    float: left;
    padding: 0 1em;
    vertical-align: middle;
    height: 48px;
    line-height: 50px;
    color: #fff;
}

.sd-polmach-nav > ul > li > a {
    color: #fff;
    display: inline-block;
    height: 100%;
    text-decoration: none;
}

.sd-polmach-nav > ul > li > a > span {
    color: #fff;
    font-weight: bold;
    font-size: 1.25em;
    text-transform: uppercase;
}

.sd-polmach-nav > ul > li > a:hover,
.sd-polmach-nav > ul > li.sd-polmach-nav__active > a {
    text-decoration: underline;
}

.sd-polmach-nav > ul > li.sd-polmach-nav__star {
    padding: 0;
    font-size: 0.9em;
    color: #fff;
}

.sd-polmach-nav > ul > li.sd-polmach-nav__purchase {
    background: linear-gradient(180deg, #339334, #1a681b);
}

.sd-polmach-nav > ul > li.sd-polmach-nav__purchase:hover {
    background: linear-gradient(180deg, #38a139, #1e791f);
}

/* Section 16b: End caps on the left and right of the red nav — blue block
   with the stars-only border image (matches legacy nav-border-starsonly.png). */
.sd-polmach-nav > ul > li.sd-polmach-nav__cap {
    padding: 0;
    background-color: #174498;
    vertical-align: top;
}

.sd-polmach-nav > ul > li.sd-polmach-nav__cap--left {
    border-right: 3px solid #d5d5d5;
}

.sd-polmach-nav > ul > li.sd-polmach-nav__cap--right {
    border-left: 3px solid #d5d5d5;
}

.sd-polmach-nav > ul > li.sd-polmach-nav__cap img {
    display: block;
    height: 50px;
    width: auto;
    vertical-align: top;
}

/* Section 17: Background image for the Political Machine theme.
   The background image contains the "The Political Machine 2024" banner
   centered at the top — the page container is pushed down so it shows
   through in the gap between the red nav and the main content. */
body.theme-polmachv2 {
    /* Using the legacy CDN-hosted banner directly — the local copy in
       /images/themes/polmach/ is a wider variant and doesn't match the
       legacy visual. */
    background: #000209 url('https://www.stardock.com/thepoliticalmachine/2024/background/TPM2024_forum.jpg') no-repeat center 60px;
}

@media (max-width: 900px) {
    body.theme-polmachv2 {
        background-position: center top;
    }
}

.theme-polmachv2 .sd-page-container {
    margin-top: 170px;
}

/* Transparent clickable overlay sitting on top of the "Political Machine 2024"
   banner baked into the body background image. Click sends the user to the
   main Political Machine website. */
.sd-polmach-hero-link {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 170px;
    z-index: 1;
    display: block;
}

@media (max-width: 900px) {
    .sd-polmach-hero-link {
        top: 60px;
        width: 100%;
        max-width: 100vw;
        height: 140px;
    }
}

/* Section 18: Mobile slide-in drawer — opened via the "Political Machine Menu"
   item in the Stardock header's mobile nav. */
.sd-polmach-drawer {
    position: fixed;
    top: 0;
    left: -200px;
    width: 179px;
    height: 100%;
    background: #a60000;
    border-right: 3px solid #d5d5d5;
    z-index: 2000;
    transition: left 0.35s ease;
    overflow-y: auto;
}

.sd-polmach-drawer--open {
    left: 0;
}

.sd-polmach-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sd-polmach-drawer > ul > li {
    background: linear-gradient(180deg, #cd0404, #a60000);
    border-bottom: 3px solid #d5d5d5;
    padding: 0.5em 0;
    line-height: 2em;
}

.sd-polmach-drawer > ul > li > a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0 1em;
}

.sd-polmach-drawer > ul > li > a > span {
    color: #fff;
    font-weight: bold;
    font-size: 1.15em;
    text-transform: uppercase;
}

.sd-polmach-drawer > ul > li > a:hover,
.sd-polmach-drawer > ul > li.sd-polmach-drawer__active > a {
    text-decoration: underline;
}

.sd-polmach-drawer > ul > li.sd-polmach-drawer__purchase {
    background: linear-gradient(180deg, #339334, #1a681b);
}

.sd-polmach-drawer > ul > li.sd-polmach-drawer__purchase:hover {
    background: linear-gradient(180deg, #38a139, #1e791f);
}

/* Section 20: Political Machine custom footer */
.sd-polmach-footer {
    display: block;
    width: 100%;
    min-height: 128px;
    padding: 20px 0;
    text-align: center;
    background: transparent;
    color: #fff;
}

.sd-polmach-footer__logo img {
    display: inline-block;
    margin-right: 15px;
    vertical-align: middle;
    max-width: 220px;
    height: auto;
}

.sd-polmach-footer__body {
    display: inline-block;
    border-left: 1px solid #fff;
    text-align: left;
    vertical-align: middle;
    width: 500px;
    max-width: 90%;
}

.sd-polmach-footer__body p {
    color: #fff;
    font-size: 9px;
    line-height: 2em;
    margin: 0 0 0 25px;
}

.sd-polmach-footer__body a {
    color: #fff;
    text-decoration: none;
}

.sd-polmach-footer__body a:hover {
    text-decoration: underline;
}

.sd-polmach-footer__separator {
    margin: 0 0.4em;
}

.sd-polmach-footer__icons {
    background: url('/images/themes/polmach/connectedIcons.png') no-repeat;
    display: inline-block;
    height: 25px;
    width: 204px;
    margin: 1em 0 0 25px;
}

.sd-polmach-footer__icon {
    display: inline-block;
    float: left;
    height: 100%;
    width: 24px;
    margin-right: 5px;
    cursor: pointer;
}

.sd-polmach-footer__icon--tv {
    width: 24px;
    margin-right: 0;
}

@media (max-width: 900px) {
    .sd-polmach-nav {
        display: none;
    }

    .sd-polmach-footer__body {
        display: block;
        margin: 0 auto;
        border-left: 0;
        border-top: 1px solid #fff;
        padding-top: 10px;
    }

    .sd-polmach-footer__body p {
        margin-left: 0;
        padding: 0 15px;
    }

    .sd-polmach-footer__logo img {
        margin: 0 0 10px 0;
    }

    .sd-polmach-footer__icons {
        margin-left: 0;
    }
}

/* Desktop mobile-nav CSS tweaks for the red nav's smaller-screen variant */
@media (max-width: 600px) {
    .sd-polmach-nav > ul > li {
        padding: 0 0.5em;
    }
    .sd-polmach-nav > ul > li > a > span {
        font-size: 1em;
    }
    .sd-polmach-nav > ul > li.sd-polmach-nav__star {
        display: none;
    }
}
