/* CorporateMachine Theme — Dark theme with gray accents */
/* Colors extracted from legacy CorporateMachine forums.scss — DARK theme, accent #555555, link #FDFDFD */
/* Section 1: Variable overrides */
.theme-corporatemachine {
    --accent-color: #555555;
    --accent-color-text: #FDFDFD;
    --background: #000000;
    --alternate-background: #181818;
    --text-color: #FDFDFD;
    --secondary-text-color: #9C9C9C;
    --table-text-color: #FDFDFD;
    --link-color: #FDFDFD;
    --border-color: #666666;
    --border-color-gradient: #313131;
    --header-background: linear-gradient(to bottom,#8C8D91 0%,#3D3E44 42%,#242529 100%);
    --header-text-color: #FDFDFD;
    --menu-background: linear-gradient(to bottom,#c3c3c3 0%,#dedede 1%,#e6e6e6 2%,#e6e6e6 55%,#d2d2d2 56%,#cbcbcb 100%);
    --menu-text-color: #000000;
    --section-header-background: #555555;
    --section-header-background-2: #555555;
    --section-header-background-3: #555555;
    --section-header-text-color: #FDFDFD;
    --body-background: #0A0A0A;
    --body-text-color: #E0E0E0;
    --nav-gradient: linear-gradient(to bottom,rgba(85,85,85,1) 0%,rgba(68,68,68,1) 100%);
    --nav-border-color: #444444;
    --error-background: #2D0000;
    --error-text-color: #FF6B6B;
    --error-border-color: #8B0000;
    --success-text-color: #4CAF50;
    --message-background: #2D2200;
    --message-text-color: #FFD54F;
    --message-border-color: #8B6914;
    --post-quote-background: #1A1A1A;
    --post-quote-text-color: #E0E0E0;
    --post-quote-border-color: #555555;
    --post-quote-header-background: #2D2D2D;
    --post-quote-header-text-color: #FDFDFD;
    --search-highlight-text-color: #45D5F7;
    --tooltip-background-color: #181818;
    --tooltip-border-color: #666666;
    --tooltip-color: #FDFDFD;
    --tooltip-highlight-color: #FDFDFD;
    --tooltip-de-emphasize-color: #8D8D8D;
    --table-header-background: #000000;
    --main-accent-color: #45D5F7;
    --sub-alert-background-color: #555555;
    --sub-alert-text-color: #FDFDFD;
    --sub-alert-link-color: #000000;
}
    /* Section 2: Site header overrides */
    .theme-corporatemachine .sd-site-header {
        background: var(--header-background);
        border-bottom-color: var(--accent-color);
    }

    .theme-corporatemachine .sd-site-title {
        color: var(--header-text-color);
    }

    /* Section 3: Breadcrumb bar */
    .theme-corporatemachine .sd-breadcrumbs li:not(:last-child)::after {
        color: var(--border-color);
    }

    /* Section 4: Forum listing rows */
    .theme-corporatemachine .sd-thread-item:hover,
    .theme-corporatemachine .sd-thread-item:nth-child(even):hover,
    .theme-corporatemachine .sd-category-row:hover,
    .theme-corporatemachine .sd-category-table tbody tr:nth-child(even):hover {
        background: rgba(85,85,85,.5);
    }

    /* Section 5: Thread group labels and section headers */
    .theme-corporatemachine .sd-thread-list-header {
        background: #0F0F0F;
    }

    /* Section 6: Post container headers (for thread view) */
    .theme-corporatemachine .sd-post-header {
        background: linear-gradient(to bottom,var(--post-quote-header-background) 0%,var(--post-quote-background) 100%);
        border-bottom: 1px solid var(--accent-color);
    }

    .theme-corporatemachine .sd-post-header__username a {
        color: var(--link-color);
        font-weight: 600;
    }
    /* Section 7: Buttons and links */
    .theme-corporatemachine .sd-btn-primary {
        background-color: var(--accent-color);
        color: var(--accent-color-text);
    }

        .theme-corporatemachine .sd-btn-primary:hover {
            background-color: var(--border-color);
        }

    .theme-corporatemachine .sd-btn-secondary {
        border-color: var(--border-color);
        color: var(--text-color);
    }

        .theme-corporatemachine .sd-btn-secondary:hover {
            background: var(--post-quote-background);
        }
    /* Section 8: Thread icon states */
    .theme-corporatemachine .sd-thread-icon--unread {
        color: var(--text-color);
    }

    .theme-corporatemachine .sd-thread-icon--read {
        color: var(--border-color);
    }
    /* Section 9: Pagination */
    .theme-corporatemachine .sd-thread-tray__page-link {
        border-color: var(--border-color);
        color: var(--link-color);
    }

        .theme-corporatemachine .sd-thread-tray__page-link:hover {
            background: var(--accent-color);
            color: var(--accent-color-text);
        }
    /* Section 10: Sidebar */
    .theme-corporatemachine .sd-sidebar {
    }
    /* Section 11: Forum jump */
    .theme-corporatemachine .sd-forum-jump__select {
        border-color: var(--border-color);
        background: var(--alternate-background);
        color: var(--text-color);
    }
    /* Section 12: Category rows (home page) — hover unified in Section 4 */
    .theme-corporatemachine .sd-category-header {
        background: var(--nav-gradient);
        color: var(--section-header-text-color);
        border-bottom: 1px solid #333333;
    }
    /* Section 13: Moderators bar */
    .theme-corporatemachine .sd-moderators {
        background: #0F0F0F;
        border-top-color: #333333;
    }
    /* Section 14: Spoiler text */
    .theme-corporatemachine .spoiler {
        background: var(--text-color);
        color: var(--text-color);
    }

        .theme-corporatemachine .spoiler:hover, .theme-corporatemachine .spoiler.revealed {
            background: transparent;
            color: inherit;
        }
    /* Section 15: Quote blocks */
    .theme-corporatemachine .sd-quote {
        background: var(--post-quote-background);
        border-left: 3px solid var(--post-quote-border-color);
        padding: .5rem .75rem;
    }

    .theme-corporatemachine .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-corporatemachine .sd-content-area {
    background: var(--body-background);
}

/* Section 16: Body background image — cityscape + "THE CORPORATE MACHINE" logo
   banner baked in, centered at the top. Page content pushed below to let it show. */
body.theme-corporatemachine {
    background: #000000 url('/images/themes/corporatemachine/tcm_background.jpg') no-repeat center top;
}

.theme-corporatemachine .sd-page-container {
    margin-top: 380px;
}

/* Section 17: Overlay nav — five uppercase links sitting above the banner,
   below the Stardock header. */
.sd-tcm-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.sd-tcm-nav ul {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
    pointer-events: auto;
}

.sd-tcm-nav li {
    display: inline-block;
    margin: 0 35px;
    font-weight: 700;
    font-size: 22px;
    text-transform: uppercase;
    font-family: "futura-pt-condensed", "Futura", "Segoe UI", Arial, sans-serif;
}

.sd-tcm-nav a {
    color: #f6f6f6;
    text-decoration: none;
}

.sd-tcm-nav a:hover {
    color: #aa9f99;
    text-decoration: underline;
}

/* Section 18: Clickable hero overlay on the "THE CORPORATE MACHINE" logo area. */
.sd-tcm-hero-link {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 640px;
    height: 240px;
    z-index: 1;
    display: block;
}

/* Section 19: Footer — Stardock logo + ESRB + copyright with vertical rule. */
.sd-tcm-footer {
    display: block;
    width: 100%;
    padding: 20px 15px;
    text-align: center;
    background: transparent;
    color: #f6f6f6;
    font-size: 11px;
}

.sd-tcm-footer__logo,
.sd-tcm-footer__esrb {
    display: inline-block;
    vertical-align: middle;
    padding-right: 20px;
}

.sd-tcm-footer__logo img {
    max-width: 164px;
    height: auto;
}

.sd-tcm-footer__esrb img {
    max-width: 35px;
    height: auto;
}

.sd-tcm-footer__copyright {
    display: inline-block;
    vertical-align: middle;
    border-left: 1px solid #f6f6f6;
    padding-left: 20px;
    max-width: 685px;
    text-align: left;
}

.sd-tcm-footer__copyright p {
    margin: 0;
    color: #f6f6f6;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    body.theme-corporatemachine {
        background: #000000 url('/images/themes/corporatemachine/tcm_background.jpg') no-repeat center 60px;
        background-size: 950px;
    }

    .theme-corporatemachine .sd-page-container {
        margin-top: 190px;
    }

    .sd-tcm-nav {
        top: 55px;
    }

    .sd-tcm-nav li {
        margin: 0 10px;
        font-size: 16px;
    }

    .sd-tcm-hero-link {
        top: 105px;
        width: 100%;
        max-width: 100vw;
        height: 150px;
    }

    .sd-tcm-footer__copyright {
        display: block;
        border-left: 0;
        border-top: 1px solid #f6f6f6;
        padding-left: 0;
        padding-top: 10px;
        margin-top: 10px;
    }

    .sd-tcm-footer__logo,
    .sd-tcm-footer__esrb {
        padding-right: 10px;
    }
}
/* Dark-theme override — whiten the Stardock-reply badge so the Stardock S shows on dark backgrounds like the legacy forums. */
.theme-corporatemachine .sd-stardock-reply {
    filter: brightness(0) invert(1);
}

/* Section 99: Mobile slide-in drawer — opened via the "The Corporate Machine
   Menu" item in the Stardock header's mobile nav. Styled with the TCM muted
   gray palette (matches the theme's understated business-suit look). */
.sd-tcm-drawer {
    position: fixed;
    top: 0;
    left: -240px;
    width: 220px;
    height: 100%;
    background: #000000;
    border-right: 2px solid #555555;
    z-index: 2000;
    transition: left 0.35s ease;
    overflow-y: auto;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.sd-tcm-drawer--open { left: 0; }

.sd-tcm-drawer ul { list-style: none; margin: 0; padding: 0; }

.sd-tcm-drawer > ul > li {
    background: linear-gradient(180deg, #2A2A2A 0%, #000000 100%);
    border-bottom: 1px solid #555555;
    padding: 0.75em 0;
}

.sd-tcm-drawer > ul > li > a {
    display: block;
    color: #FDFDFD;
    text-decoration: none;
    padding: 0 1em;
}

.sd-tcm-drawer > ul > li > a > span {
    color: #FDFDFD;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sd-tcm-drawer > ul > li > a:hover > span,
.sd-tcm-drawer > ul > li.sd-tcm-drawer__active > a > span {
    color: #c8c8c8;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.sd-tcm-drawer > ul > li.sd-tcm-drawer__purchase {
    background: linear-gradient(180deg, #777777 0%, #333333 100%);
    border-bottom: 1px solid #999999;
}

.sd-tcm-drawer > ul > li.sd-tcm-drawer__purchase > a > span {
    color: #FDFDFD;
    text-shadow: 1px 1px 2px #000;
}

.sd-tcm-drawer > ul > li.sd-tcm-drawer__purchase > a:hover > span {
    color: #ffffff;
}

.sd-tcm-drawer > ul > li.sd-tcm-drawer__close {
    background: linear-gradient(180deg, #1A1A1A 0%, #000000 100%);
    border-top: 1px solid #555555;
}
