/**
 * Pressify Dark Mode — single source of truth
 *
 * @package Pressify
 */

/* =====================================================================
   CSS Custom Properties
   ===================================================================== */

html.pressify-dark {
  --pressify-bg: #0f0f0f;
  --pressify-card-bg: #1a1a1a;
  --pressify-text: #e0e0e0;
  --pressify-text-muted: #999999;
  --pressify-border: #2e2e2e;
  --pressify-primary: #1a2a4a;
  --pressify-link: #e0e0e0;
  --pressify-link-ext: var(--pressify-accent);
  --pressify-link-hover: var(--pressify-accent);
}

/* =====================================================================
   Global
   ===================================================================== */

html.pressify-dark body {
  background: var(--pressify-bg) !important;
  background-color: var(--pressify-bg) !important;
  color: var(--pressify-text);
}

html.pressify-dark .pressify-site,
html.pressify-dark .pressify-main,
html.pressify-dark #page,
html.pressify-dark #content {
  background: transparent;
  color: var(--pressify-text);
}

/* All text defaults to light */
html.pressify-dark,
html.pressify-dark p,
html.pressify-dark li,
html.pressify-dark td,
html.pressify-dark th,
html.pressify-dark span,
html.pressify-dark label,
html.pressify-dark figcaption,
html.pressify-dark dt,
html.pressify-dark dd { color: var(--pressify-text); }

/* Links — neutral by default, accent red on hover */
html.pressify-dark a { color: #e0e0e0; }
html.pressify-dark a:hover { color: var(--pressify-accent); }

/* Headings */
html.pressify-dark h1,
html.pressify-dark h2,
html.pressify-dark h3,
html.pressify-dark h4,
html.pressify-dark h5,
html.pressify-dark h6 { color: #f0f0f0; }

/* =====================================================================
   Single Post — page background and wrappers
   ===================================================================== */

html.pressify-dark .pressify-single,
html.pressify-dark .pressify-single__wrap,
html.pressify-dark .pressify-single__content,
html.pressify-dark .pressify-single__header { background: transparent; color: var(--pressify-text); }

/* =====================================================================
   Single Post — content body (the_content output)
   ===================================================================== */

html.pressify-dark .pressify-single__entry,
html.pressify-dark .pressify-single__entry p,
html.pressify-dark .pressify-single__entry li,
html.pressify-dark .pressify-single__entry td,
html.pressify-dark .pressify-single__entry th,
html.pressify-dark .pressify-single__entry span,
html.pressify-dark .pressify-single__entry figcaption,
html.pressify-dark .pressify-single__entry dt,
html.pressify-dark .pressify-single__entry dd,
html.pressify-dark .pressify-single__entry blockquote,
html.pressify-dark .pressify-single__entry cite,
html.pressify-dark .pressify-single__entry strong,
html.pressify-dark .pressify-single__entry em,
html.pressify-dark .pressify-single__entry b,
html.pressify-dark .pressify-single__entry i,
html.pressify-dark .pressify-single__entry small { color: var(--pressify-text); }

html.pressify-dark .pressify-single__entry h1,
html.pressify-dark .pressify-single__entry h2,
html.pressify-dark .pressify-single__entry h3,
html.pressify-dark .pressify-single__entry h4,
html.pressify-dark .pressify-single__entry h5,
html.pressify-dark .pressify-single__entry h6 { color: #f0f0f0; }

/* Post body links — always accent red */
html.pressify-dark .pressify-single__entry a { color: var(--pressify-accent); }
html.pressify-dark .pressify-single__entry a:hover { color: var(--pressify-accent); filter: brightness(1.3); }

/* Post body tables */
html.pressify-dark .pressify-single__entry table { border-color: var(--pressify-border); }
html.pressify-dark .pressify-single__entry table th { background: var(--pressify-primary); color: #fff; }
html.pressify-dark .pressify-single__entry table td { border-bottom-color: var(--pressify-border); }
html.pressify-dark .pressify-single__entry table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* Post body blockquotes */
html.pressify-dark .pressify-single__entry blockquote {
  background: rgba(255,255,255,0.04);
  border-left-color: var(--pressify-accent);
}

/* Post body code */
html.pressify-dark .pressify-single__entry code { background: #2a2a2a; color: var(--pressify-accent); filter: brightness(1.4); }

/* Post body images captions */
html.pressify-dark .pressify-single__entry .wp-caption-text { color: var(--pressify-text-muted); }

/* Post body lists */
html.pressify-dark .pressify-single__entry ul,
html.pressify-dark .pressify-single__entry ol { color: var(--pressify-text); }

/* Single post title & meta */
html.pressify-dark .pressify-single__title { color: #f0f0f0; }
html.pressify-dark .pressify-meta a { color: var(--pressify-text-muted); }

/* Breadcrumbs */
html.pressify-dark .pressify-breadcrumbs { color: var(--pressify-text-muted); }
html.pressify-dark .pressify-breadcrumbs a { color: #ccc; }
html.pressify-dark .pressify-breadcrumbs a:hover { color: var(--pressify-accent); }

/* =====================================================================
   Cards
   ===================================================================== */

html.pressify-dark .pressify-card { background: var(--pressify-card-bg); }
html.pressify-dark .pressify-card a { color: inherit; }
html.pressify-dark .pressify-card__title { color: #f0f0f0; }
html.pressify-dark .pressify-card--list { border-bottom-color: var(--pressify-border); }
html.pressify-dark .pressify-card__placeholder { background: linear-gradient(135deg, #2e2e2e 0%, #1a1a1a 100%); }
html.pressify-dark .pressify-badge { color: #fff; }

/* =====================================================================
   Header & Logo
   ===================================================================== */

html.pressify-dark .pressify-header { background: var(--pressify-card-bg); border-bottom-color: var(--pressify-border); }
html.pressify-dark .pressify-logo-text { color: #f0f0f0; }
html.pressify-dark .pressify-top-bar { background: color-mix(in srgb, var(--pressify-primary) 70%, #000); }

/* =====================================================================
   Navigation
   ===================================================================== */

html.pressify-dark .pressify-nav { background: var(--pressify-primary); }
html.pressify-dark .pressify-nav a { color: var(--pressify-accent-2); }
html.pressify-dark .pressify-nav-menu .sub-menu { background: #1e1e1e; }
html.pressify-dark .pressify-nav-menu .sub-menu a { color: #d0d0d0; }
html.pressify-dark .pressify-nav-menu .sub-menu a:hover { background: #2a2a2a; color: var(--pressify-accent); }
html.pressify-dark .pressify-nav-menu .mega-menu-item > .sub-menu { background: #1e1e1e; }
html.pressify-dark .pressify-nav-menu .mega-menu-item > .sub-menu a { color: #d0d0d0; }

/* =====================================================================
   Search overlay
   ===================================================================== */

html.pressify-dark .pressify-search-overlay__form { background: #222; border-color: var(--pressify-accent); }
html.pressify-dark .pressify-search-overlay__input { color: #e0e0e0; }
html.pressify-dark .pressify-search-overlay .pressify-ajax-search-results { background: #222; border-color: #333; }

/* =====================================================================
   TOC
   ===================================================================== */

html.pressify-dark .pressify-toc { background: var(--pressify-card-bg); border-color: var(--pressify-border); border-top-color: var(--pressify-accent); }
html.pressify-dark .pressify-toc__title { color: var(--pressify-text-muted); }
html.pressify-dark .pressify-toc__item a { color: #d0d0d0; }
html.pressify-dark .pressify-toc__item a::before { color: #888; }
html.pressify-dark .pressify-toc__item.is-active a,
html.pressify-dark .pressify-toc__item.is-active a::before { color: var(--pressify-accent); }
html.pressify-dark .pressify-toc__item a:hover,
html.pressify-dark .pressify-toc__item a:hover::before { color: var(--pressify-accent); }
html.pressify-dark .pressify-toc__item { border-bottom-color: var(--pressify-border); }

/* =====================================================================
   Blockquote & code (global, outside post body too)
   ===================================================================== */

html.pressify-dark blockquote { background: rgba(255,255,255,0.04); border-left-color: var(--pressify-accent); }
html.pressify-dark code { background: #2a2a2a; color: var(--pressify-accent); filter: brightness(1.4); }
html.pressify-dark table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
html.pressify-dark table th { background: var(--pressify-primary); }

/* =====================================================================
   Forms (global)
   ===================================================================== */

html.pressify-dark input,
html.pressify-dark textarea,
html.pressify-dark select {
  background: var(--pressify-card-bg);
  color: var(--pressify-text);
  border-color: var(--pressify-border);
}

/* =====================================================================
   Social Share
   ===================================================================== */

html.pressify-dark .pressify-social-share__btn { background: var(--pressify-primary); border-color: var(--pressify-primary); color: var(--pressify-accent-2); }
html.pressify-dark .pressify-social-share__btn svg { color: var(--pressify-accent); }
html.pressify-dark .pressify-social-share__btn:hover { background: var(--pressify-accent); border-color: var(--pressify-accent); color: var(--pressify-accent-2); }
html.pressify-dark .pressify-social-share__btn:hover svg { color: var(--pressify-accent-2); }
html.pressify-dark .pressify-social-share--mobile-bottom { background: var(--pressify-primary); border-color: var(--pressify-border); }

/* =====================================================================
   Author Box
   ===================================================================== */

html.pressify-dark .pressify-author-box { background: var(--pressify-card-bg); border-color: var(--pressify-border); border-left-color: var(--pressify-accent); }

/* =====================================================================
   Comments
   ===================================================================== */

html.pressify-dark .pressify-comments { background: var(--pressify-bg); border-top-color: var(--pressify-border); }
html.pressify-dark .pressify-comment__body { background: var(--pressify-card-bg); border-color: var(--pressify-border); }
html.pressify-dark .pressify-comment__author { color: #f0f0f0; }
html.pressify-dark .pressify-comments .comment-reply-title { color: #f0f0f0; }
html.pressify-dark .pressify-comments .logged-in-as { color: var(--pressify-text-muted); }
html.pressify-dark .pressify-comments .logged-in-as a { color: var(--pressify-accent); }
html.pressify-dark .pressify-comments .comment-form textarea,
html.pressify-dark .pressify-comments .comment-form input[type="text"],
html.pressify-dark .pressify-comments .comment-form input[type="email"],
html.pressify-dark .pressify-comments .comment-form input[type="url"] {
  background: #222; color: var(--pressify-text); border-color: #3a3a3a;
}
html.pressify-dark .pressify-comments .comment-form textarea:focus,
html.pressify-dark .pressify-comments .comment-form input:focus {
  border-color: var(--pressify-accent);
}

/* =====================================================================
   Homepage
   ===================================================================== */

html.pressify-dark .pressify-home-section__title a { color: #f0f0f0; }
html.pressify-dark .pressify-home-section__all { color: var(--pressify-accent); }

/* =====================================================================
   Pagination
   ===================================================================== */

html.pressify-dark .pressify-pagination a,
html.pressify-dark .pressify-pagination span { border-color: var(--pressify-border); color: var(--pressify-text); }
html.pressify-dark .pressify-pagination .current { background: var(--pressify-accent); color: #fff; border-color: var(--pressify-accent); }

/* =====================================================================
   Footer
   ===================================================================== */

html.pressify-dark .pressify-footer-widgets { background: color-mix(in srgb, var(--pressify-primary) 50%, #000); }
html.pressify-dark .pressify-footer-bottom { background: color-mix(in srgb, var(--pressify-primary) 30%, #000); }
html.pressify-dark .pressify-footer-bottom a { color: #aaa; }
html.pressify-dark .pressify-footer-menu a { color: #aaa; }

/* =====================================================================
   Widgets & Sidebar
   ===================================================================== */

html.pressify-dark .widget { color: var(--pressify-text); }
html.pressify-dark .widget a { color: #ccc; }
html.pressify-dark .widget a:hover { color: var(--pressify-accent); }
html.pressify-dark .widget_search .search-field { background: var(--pressify-card-bg); color: var(--pressify-text); border-color: var(--pressify-border); }
html.pressify-dark .widget_search .search-submit { background: var(--pressify-accent); color: #fff; border: none; }

html.pressify-dark .pressify-footer-widget { color: var(--pressify-accent-2); }
html.pressify-dark .pressify-footer-widget a { color: rgba(255,255,255,0.85); }

/* =====================================================================
   Archive, 404, Exit Popup, Page
   ===================================================================== */

html.pressify-dark .pressify-archive-header { background: var(--pressify-primary); }
html.pressify-dark .pressify-exit-popup__modal { background: var(--pressify-card-bg); }
html.pressify-dark .pressify-page__content { color: var(--pressify-text); }

/* =====================================================================
   Related Posts section
   ===================================================================== */

html.pressify-dark .pressify-related { border-top-color: var(--pressify-border); }
html.pressify-dark .pressify-related__title { color: #f0f0f0; }
