/* GalCiv4 Theme — Dark theme with gold/amber accents */
/* Colors extracted from legacy GalCiv4 forums.scss and sd2017.gc4.scss */
/* Section 1: Variable overrides */
body.theme-galciv4 {
    padding-top: 33px;
}

.theme-galciv4 {
    --accent-color: #876f3d;
    --accent-color-text: #FDFDFD;
    --background: #0A0A0A;
    --alternate-background: #181818;
    --text-color: #E8E8E8;
    --secondary-text-color: #9C9C9C;
    --table-text-color: #C8C8C8;
    --link-color: #d2ad6a;
    --border-color: #414141;
    --border-color-gradient: #1A1A1A;
    --header-background: #1E1E1E;
    --header-text-color: #E8E8E8;
    --menu-background: #0A0A0A;
    --menu-text-color: #E8E8E8;
    --section-header-background: #1A1A0E;
    --section-header-background-2: #141410;
    --section-header-background-3: linear-gradient(to bottom,#1E1E14 0%,#0F0F0A 100%);
    --section-header-text-color: #D0C8B0;
    --body-background: #111111;
    --body-text-color: #E0E0E0;
    --nav-gradient: linear-gradient(to bottom,rgba(100,80,40,1) 0%,rgba(135,111,61,1) 100%);
    --nav-border-color: #876f3d;
    --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: #1A1A14;
    --post-quote-text-color: #C8C8C0;
    --post-quote-border-color: #4A3A1A;
    --post-quote-header-background: #141410;
    --post-quote-header-text-color: #977b49;
    --search-highlight-text-color: #d2ad6a;
    --tooltip-background-color: #1E1E1E;
    --tooltip-border-color: #414141;
    --tooltip-color: #E8E8E8;
    --tooltip-highlight-color: #d2ad6a;
    --tooltip-de-emphasize-color: #6A6A6A;
    --table-header-background: #0A0A0A;
    --main-accent-color: #d2ad6a;
    --sub-alert-background-color: #876f3d;
    --sub-alert-text-color: #FDFDFD;
    --sub-alert-link-color: #0A0A0A;
}
    /* Section 2: Site header overrides */
    .theme-galciv4 .sd-site-header {
        background: linear-gradient(to bottom,#1E1E14 0%,#141410 100%);
        border-bottom-color: var(--accent-color);
    }

    .theme-galciv4 .sd-site-title {
        color: var(--link-color);
    }
    /* Section 3: Breadcrumb bar */
    .theme-galciv4 .sd-breadcrumbs li:not(:last-child)::after {
        color: #6A5A3A;
    }
    /* Section 4: Forum listing rows */
    .theme-galciv4 .sd-thread-item:hover,
    .theme-galciv4 .sd-thread-item:nth-child(even):hover,
    .theme-galciv4 .sd-category-row:hover,
    .theme-galciv4 .sd-category-table tbody tr:nth-child(even):hover {
        background: rgba(210,173,106,.08);
    }
    /* Section 5: Thread group labels and section headers */


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

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

        .theme-galciv4 .sd-btn-primary:hover {
            background-color: #8a6f40;
        }

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

        .theme-galciv4 .sd-btn-secondary:hover {
            background: #252018;
        }
    /* Section 8: Thread icon states */
    .theme-galciv4 .sd-thread-icon--unread {
        color: var(--link-color);
    }

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

        .theme-galciv4 .sd-thread-tray__page-link:hover {
            background: var(--accent-color);
            color: var(--accent-color-text);
        }
    /* Section 10: Sidebar */
    .theme-galciv4 .sd-sidebar {
    }
    /* Section 11: Forum jump */
    .theme-galciv4 .sd-forum-jump__select {
        border-color: var(--border-color);
        background: var(--section-header-background-2);
    }
    /* Section 12: Category rows (home page) — hover unified in Section 4 */
    .theme-galciv4 .sd-category-header {
        background: linear-gradient(to bottom,#1E1E14 0%,#141410 100%);
        color: var(--link-color);
        border-bottom: 1px solid var(--border-color);
    }
    /* Section 13: Moderators bar */
    .theme-galciv4 .sd-moderators {
        background: var(--section-header-background-2);
        border-top-color: #2A2A1A;
    }
    /* Section 14: Spoiler text */
    .theme-galciv4 .spoiler {
        background: var(--link-color);
        color: var(--link-color);
    }

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

    .theme-galciv4 .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;
    }
    /* Section 16: Site nav overrides — dark bar with red accents over the
       supernova artwork banner. The Nav.BackgroundImageUrl entry was removed
       from appsettings.json for this theme so _SiteNav.cshtml doesn't inject
       a duplicate inline copy on top of this CSS-driven background-image. */
    .theme-galciv4 .site-nav {
        --site-nav-bg: transparent;
        --site-nav-text: #fff;
        --site-nav-hover-bg: transparent;
        --site-nav-active-bg: rgba(152,0,0,.9);
        --site-nav-border-color: #980000;
        --site-nav-border-top: none;
        --site-nav-border-bottom: none;
        background-size: cover;
        background-position: center;
        padding-bottom: 25rem;
        background-image: url("https://www.stardock.com/galciv4/supernova/gc4supernova_subpage_releaseheader.jpg");
        padding-top: 42px;
    }

    /* Mobile: shrink the supernova banner so it doesn't dominate the page —
       the full 25rem padding-bottom is too tall for a phone viewport. */
    @media (max-width: 900px) {
        .theme-galciv4 .site-nav__bar {
            display: none;
        }
    }
    @media (max-width: 760px) {
        .theme-galciv4 .site-nav {
            padding-bottom: 16rem;
            background-size: 1570px;
            background-repeat: no-repeat;
            margin-top: -74px;
        }
    }

    .theme-galciv4 .site-nav__logo {
        display: none
    }

    .theme-galciv4 .site-nav__bar {
        background: linear-gradient(to right,transparent,rgba(0,0,0,.9) 5%,rgba(0,0,0,.9) 95%,transparent);
        background-size: 100% 100%;
        border-top: 1px solid #980000;
        border-bottom: 1px solid #980000;
        justify-content: center;
        max-width: 1760px;
        font-family: 'Bai Jamjuree',sans-serif
    }

    .theme-galciv4 .site-nav__item a {
        position: relative;
        transition: text-shadow .25s ease-in-out;
        padding: 0 1.5rem
    }

    .theme-galciv4 .site-nav__item:not(.store) a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #ba0000;
        box-shadow: 0 0 5px #ba0000;
        transform: scaleX(0);
        transition: transform .2s ease-in-out
    }

    .theme-galciv4 .site-nav__item:not(.store) a:hover::after, .theme-galciv4 .site-nav__item--active:not(.store) a::after {
        transform: scaleX(1)
    }

    .theme-galciv4 .site-nav__item a:hover, .theme-galciv4 .site-nav__item--active a {
        text-shadow: 0 3px 10px #ff0000;
        background: transparent
    }

    .theme-galciv4 .site-nav__item.store a {
        background: linear-gradient(180deg,#339334,#1a681b);
        color: #fff;
        padding: 0 2.5rem;
        height: 46px;
        line-height: 46px
    }

        .theme-galciv4 .site-nav__item.store a:hover {
            background: linear-gradient(180deg,#38a139,#1e791f)
        }

/* Content area background */
.theme-galciv4 .sd-content-area {
    background: var(--body-background);
}
/* Dark-theme override — whiten the Stardock-reply badge so the Stardock S shows on dark backgrounds like the legacy forums. */
.theme-galciv4 .sd-stardock-reply {
    filter: brightness(0) invert(1);
}

/* Section 17: Mobile slide-in drawer — opened via the "Galactic Civilizations
   IV Menu" item in the Stardock header's mobile nav. Styled with the theme's
   gold/amber palette and a green "Store" CTA matching the desktop nav. */
.sd-gc4-drawer {
    position: fixed;
    top: 0;
    left: -240px;
    width: 220px;
    height: 100%;
    background: #0A0A0A;
    border-right: 2px solid #876f3d;
    z-index: 2000;
    transition: left 0.35s ease;
    overflow-y: auto;
    font-family: 'Bai Jamjuree', 'Segoe UI', Arial, sans-serif;
}

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

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

.sd-gc4-drawer > ul > li {
    background: linear-gradient(180deg, #1E1E14 0%, #0A0A0A 100%);
    border-bottom: 1px solid #876f3d;
    padding: 0.75em 0;
}

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

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

.sd-gc4-drawer > ul > li > a:hover > span,
.sd-gc4-drawer > ul > li.sd-gc4-drawer__active > a > span {
    color: #d2ad6a;
    text-shadow: 0 3px 10px #ff0000;
}

.sd-gc4-drawer > ul > li.sd-gc4-drawer__store {
    background: linear-gradient(180deg, #339334 0%, #1a681b 100%);
    border-bottom: 1px solid #38a139;
}

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

.sd-gc4-drawer > ul > li.sd-gc4-drawer__store > a:hover > span {
    color: #c8ffd0;
}

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

/* New Topic — GalCiv4 amber pill matching the supernova nav identity. */
.theme-galciv4 .sd-forumhead__new-topic {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 6px rgba(135,111,61,.4);
    border-radius: 4px;
    color: var(--accent-color-text);
    font-family: 'Bai Jamjuree', 'Segoe UI', Arial, sans-serif;
    letter-spacing: 1px;
}

    .theme-galciv4 .sd-forumhead__new-topic:hover {
        background: #8a6f40;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 10px rgba(210,173,106,.5);
        opacity: 1;
    }
