/* Free-DC News System Stylesheet
   Colors matched exactly from theme1/colors.php */

:root {
    /* From $main array */
    --body-bg: #587087;
    --header-bg: #FFFFFF;
    --content-bg: #FFFFFF;
    --sidebar-bg: #FFFFFF;
    --framework-bg: #FFFFFF;
    --title-color: #CCCCCC;
    --sidebar-link: #587097;
    --sidebar-link-hover: #6A87A2;
    --sidebar-link-visited: #875870;
    --framework-msg: #0A168D;
    --tickertape-bg: #C0C0C0;

    /* From $colors1 - nav bar gradient */
    --nav-bg: #3A4046;
    --nav-dark: #171E25;

    /* From $colors2 - nav bar highlights */
    --nav-hover: #4A5056;

    /* From $dTable array */
    --table-border: #000000;
    --th-color: #ffffff;
    --th-bg: #313131;
    --td-border: #aaaaaa;
    --caption-color: #ffffff;
    --caption-bg: #000000;
    --table-link: #004276;
    --table-link-visited: #5C7996;
    --table-link-hover: #CA0002;
    --th-link: #ffffff;
    --tr-bg: #ffffff;
    --tr-hover: #eceec5;
    --tr-hover2: #d7dc84;

    /* From $body_colors */
    --body-gradient-start: #000000;
    --body-gradient-end: #587078;

    /* From $chart_colors */
    --chart-blue: rgb(142,186,242);

    /* Utility */
    --admin-red: #cc3333;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-light: #aaaaaa;
}
@font-face {
    font-family: RevueBT;
    src: url(/fonts/revuen.eot?#iefix) format('application/vnd.ms-fontobject'),
         url(/fonts/revuen.woff) format('application/font-woff'),
         url(/fonts/revuen.ttf) format('application/x-font-truetype'),
         url(/fonts/revuen.svg#revue_btregular) format('image/svg+xml');
    font-weight:400;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    background-color: var(--body-bg);
    background-image: linear-gradient(to bottom, var(--body-gradient-start), var(--body-gradient-end));
    background-repeat: repeat-x;
    background-position: top left;
    color: #000000;
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a {
    color: var(--table-link);
    text-decoration: none;
}

a:visited {
    color: var(--table-link-visited);
}

a:hover {
    color: var(--table-link-hover);
    text-decoration: underline;
}

/* ── Site Container ── */

.site-container {
    margin: 8px;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ── Site Header ── */

.site-header {
    background-color: var(--header-bg);
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: top;
    justify-content: space-between;
    padding: 8px 12px;
    min-height: 100px;
}

.site-logo {
    display: flex;
    flex-direction: column;
}

.site-logo-title, .site-logo-title:visited {
    font-family: RevueBT;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 4px 4px 4px #CCCCCC;
    color: black;
}

.site-logo-title:hover {
    color: #333;
    text-decoration: none;
}

.site-logo-subtitle {
    font-family: Arial, sans-serif;
    font-size: 10px;
    margin-top: -36px;
    margin-left: 13px;
}

.header-right {
    text-align: right;
    font-size: 11px;
    color: #666;
}

/* ── Navigation Bar ── */

.site-nav {
    background: linear-gradient(to bottom, #3A4046, #171E25);
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    flex-wrap: wrap;
    color: #fff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 5px 12px;
    font-size: 12px;
    display: inline-block;
    transition: background 0.15s;
}

.nav-links a:visited {
    color: #ffffff;
}

.nav-links a:hover {
    background: linear-gradient(to bottom, #4A5056, #272E35);
    text-decoration: none;
    color: #fff;
}

.nav-links a.active {
    background: linear-gradient(to bottom, #4A5056, #272E35);
    color: #fff;
}

.nav-admin-link {
    background: var(--admin-red) !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 11px !important;
    padding: 3px 8px !important;
    border-radius: 2px;
    margin-left: 4px;
}

.nav-admin-link:hover {
    background: #dd4444 !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #ccc;
}

.nav-right a {
    color: #fff;
    font-size: 11px;
}

.nav-right a:visited {
    color: #ddd;
}

/* ── News Ticker ── */

.news-ticker {
    background-color: var(--tickertape-bg);
    overflow: hidden;
    padding: 2px 10px;
    white-space: nowrap;
    border-bottom: 1px solid #999;
}

.ticker-content {
    display: inline-block;
    color: #333;
    font-size: 11px;
    font-weight: bold;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ── Page Layout ── */

.page-wrapper {
    display: flex;
    max-width: 100%;
    min-height: calc(100vh - 110px);
}

/* ── Sidebar ── */

.sidebar {
    width: 150px;
    min-width: 150px;
    background-color: var(--sidebar-bg);
    padding: 6px 6px;
    font-size: 11px;
    border-right: 1px solid #ccc;
}

.sidebar-section {
    margin-bottom: 10px;
}

.sidebar-heading {
    color: var(--th-color);
    background: linear-gradient(to bottom, #3A4046, #171E25);
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    margin: 0 -6px 5px -6px;
}

.sidebar-links {
    list-style: none;
    padding-left: 4px;
}

.sidebar-links li {
    margin: 1px 0;
}

.sidebar-links a {
    color: var(--sidebar-link);
    font-size: 11px;
    display: block;
    padding: 1px 2px;
}

.sidebar-links a:visited {
    color: var(--sidebar-link-visited);
}

.sidebar-links a:hover {
    color: var(--sidebar-link-hover);
    text-decoration: underline;
}

.sidebar-login {
    font-size: 11px;
    color: #666;
    padding-left: 4px;
}

.sidebar-login a {
    color: var(--sidebar-link);
}

.sidebar-stats {
    font-size: 11px;
    padding-left: 4px;
    line-height: 1.6;
}

/* ── Main Content Area ── */

.main-content {
    flex: 1;
    padding: 8px 12px;
    min-width: 0;
    background-color: var(--content-bg);
}

.page-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
}

/* ── News Posts ── */

.news-post {
    background: var(--content-bg);
    border: 1px solid var(--table-border);
    margin-bottom: 10px;
    overflow: hidden;
}

.post-header {
    background-color: var(--th-bg);
    padding: 6px 10px;
}

.post-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--th-color);
    margin-bottom: 2px;
    line-height: 1.3;
}

.post-title a {
    color: var(--th-link);
    text-decoration: none;
}

.post-title a:visited {
    color: #cccccc;
}

.post-title a:hover {
    color: #e6e6e6;
    text-decoration: underline;
}

.post-meta {
    font-size: 10px;
    color: #bbb;
}

.post-meta .author {
    color: #ddd;
    font-weight: bold;
}

.post-body {
    padding: 8px 10px;
    font-size: 12px;
    color: #000;
    line-height: 1.6;
    border-top: 1px solid var(--td-border);
}

.post-body p {
    margin-bottom: 8px;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-body a {
    color: var(--table-link);
    text-decoration: underline;
}

.post-body a:hover {
    color: var(--table-link-hover);
}

.post-body ul,
.post-body ol {
    margin: 6px 0 6px 20px;
}

.post-body code {
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 11px;
}

.post-body pre {
    background: #f4f4f4;
    padding: 8px;
    overflow-x: auto;
    margin: 6px 0;
    border: 1px solid #ccc;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

.post-admin-bar {
    padding: 4px 10px;
    border-top: 1px solid var(--td-border);
    background: #f5f5f5;
    display: flex;
    gap: 4px;
}

/* ── Single Post View ── */

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--table-link);
    text-decoration: none;
    font-size: 11px;
}

.back-link:hover {
    color: var(--table-link-hover);
    text-decoration: underline;
}

/* ── Pagination ── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 3px 8px;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #999;
}

.pagination a {
    background: #fff;
    color: var(--table-link);
}

.pagination a:hover {
    background: var(--tr-hover);
    color: #000;
    text-decoration: none;
}

.pagination .current {
    background: var(--th-bg);
    color: #fff;
    border-color: #000;
}

.pagination .dots {
    color: #666;
    border-color: transparent;
}

/* ── Empty State ── */

.empty-state {
    background: var(--content-bg);
    border: 1px solid var(--table-border);
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* ── Footer ── */

.site-footer {
    text-align: center;
    padding: 10px;
    color: var(--title-color);
    font-size: 11px;
    background: linear-gradient(to bottom, #616161, #010101);
    border-radius: 0 0 7px 7px;
}

.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: #eee;
}

/* ── Flash Messages ── */

.flash-message {
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 8px;
    border: 1px solid;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ── Draft Banner ── */

.draft-banner {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: bold;
}

/* ── Buttons ── */

.btn {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--th-bg);
    color: #fff;
    border-color: #000;
}

.btn-primary:hover {
    background: var(--nav-hover);
    color: #fff;
}

.btn-danger {
    background: var(--admin-red);
    color: #fff;
    border-color: #991a1a;
}

.btn-danger:hover {
    background: #dd4444;
    color: #fff;
}

.btn-secondary {
    background: #ddd;
    color: #333;
    border-color: #999;
}

.btn-secondary:hover {
    background: #ccc;
    color: #000;
}

/* ── Admin Styles ── */

.admin-toolbar {
    background: #f5f5f5;
    border: 1px solid var(--table-border);
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-toolbar h2 {
    font-size: 14px;
    color: #000;
}

.admin-table {
    width: 100%;
    border: 1px solid var(--table-border);
    border-collapse: collapse;
}

.admin-table th {
    background-color: var(--th-bg);
    color: var(--th-color);
    padding: 5px 8px;
    text-align: left;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 1px solid #000;
}

.admin-table th a {
    color: var(--th-link);
}

.admin-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--td-border);
    font-size: 11px;
    vertical-align: middle;
    background: var(--tr-bg);
}

.admin-table tr:hover td {
    background: var(--tr-hover);
}

.admin-table .actions {
    white-space: nowrap;
    display: flex;
    gap: 3px;
}

.status-published {
    color: #228B22;
    font-weight: bold;
    font-size: 11px;
}

.status-draft {
    color: #CC6600;
    font-weight: bold;
    font-size: 11px;
}

/* ── Compose Form ── */

.compose-form {
    background: #fff;
    border: 1px solid var(--table-border);
    padding: 12px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 12px;
    color: #000;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #aaa;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    background: #fff;
    color: #000;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a7a9a;
}

.form-group textarea {
    min-height: 350px;
    resize: vertical;
    line-height: 1.6;
}

.form-group select {
    max-width: 200px;
}

.form-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.form-help {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #ccc;
        padding: 6px 10px;
    }

    .sidebar-heading {
        margin: 0 -10px 5px -10px;
    }

    .sidebar-links {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sidebar-links li {
        margin: 0;
    }

    .main-content {
        padding: 8px 10px;
    }

    .site-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 4px 8px;
        gap: 4px;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .admin-toolbar {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}
