/* Custom styles for mirrorlesshumors */

.post-cover {
  margin-bottom: 1rem;
}

.post-cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Share buttons */
.post-share {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-label {
  font-weight: bold;
  color: #666;
}

.share-buttons a {
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
}

.share-buttons a[title="Facebook"] { background: #3b5998; color: #fff; }
.share-buttons a[title="Twitter"] { background: #1da1f2; color: #fff; }
.share-buttons a[title="LinkedIn"] { background: #0077b5; color: #fff; }
.share-buttons a[title="Email"] { background: #666; color: #fff; }

/* Related posts */
.related-posts {
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid #eee;
}

.related-posts h3 {
  margin-bottom: 1rem;
}

.related-posts ul {
  list-style: none;
  padding: 0;
}

.related-posts li {
  margin-bottom: 0.5rem;
}

.related-posts a {
  font-weight: 500;
}

.related-date {
  color: #999;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* ============================
   Full-width background fix
   ============================ */
html {
  background-color: #f8f5ec;
}

body.dark-mode ~ html,
html:has(body.dark-mode) {
  background-color: #1a1a2e;
}

/* Dark mode toggle - inline with menu items */
#dark-mode-toggle {
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  background: none;
  border: none;
  text-decoration: none !important;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: inline-block;
}

#dark-mode-toggle:hover {
  opacity: 1;
}

/* Remove underline animation from toggle's parent menu-item */
.menu-item:last-child::after {
  display: none !important;
}

/* Mobile dark mode toggle */
#mobile-dark-toggle {
  cursor: pointer;
}

.light-mode-label,
.dark-mode-label { display: inline; }

body.dark-mode .dark-mode-label { display: none; }
body.dark-mode .light-mode-label { display: inline; }

body:not(.dark-mode) .light-mode-label { display: none; }
body:not(.dark-mode) .dark-mode-label { display: inline; }

#mobile-dark-toggle .light-mode-icon { display: none; }
body.dark-mode #mobile-dark-toggle .light-mode-icon { display: inline; }
body.dark-mode #mobile-dark-toggle .dark-mode-icon { display: none; }

.light-mode-icon { display: none; }
body.dark-mode .light-mode-icon { display: inline; }
body.dark-mode .dark-mode-icon { display: none; }

/* ============================
   Dark Mode - Full Coverage
   ============================ */

body.dark-mode {
  background-color: #1a1a2e;
  color: #d4d4dc;
}

/* Header */
body.dark-mode .header {
  background-color: #16213e;
}

body.dark-mode .logo {
  color: #e0e0e0;
}

body.dark-mode .menu-item-link {
  color: #b8b8c8;
}

body.dark-mode .menu-item-link:hover {
  color: #fff;
}

/* Mobile nav */
body.dark-mode .mobile-navbar {
  background-color: #16213e;
}

body.dark-mode .mobile-header-logo a {
  color: #e0e0e0;
}

body.dark-mode .mobile-menu {
  background-color: #1a1a2e;
}

body.dark-mode .mobile-menu-list .mobile-menu-item {
  color: #b8b8c8;
}

/* Links */
body.dark-mode a {
  color: #7cb8f7;
}

body.dark-mode a:hover {
  color: #a8d4ff;
}

/* Content area */
body.dark-mode .content-wrapper,
body.dark-mode .container,
body.dark-mode .main {
  background-color: #1a1a2e;
}

/* Posts list & single */
body.dark-mode .post {
  background-color: #1a1a2e;
  border-color: #2a2a4a;
}

body.dark-mode .post + .post {
  border-top-color: #2a2a4a;
}

body.dark-mode .post-title a {
  color: #e8e8f0;
}

body.dark-mode .post-title a:hover {
  color: #7cb8f7;
}

body.dark-mode .post-content {
  color: #d4d4dc;
}

body.dark-mode .post-content h1,
body.dark-mode .post-content h2,
body.dark-mode .post-content h3,
body.dark-mode .post-content h4,
body.dark-mode .post-content h5,
body.dark-mode .post-content h6 {
  color: #e8e8f0;
}

body.dark-mode .post-meta,
body.dark-mode .more-meta {
  color: #8888a0;
}

body.dark-mode .post-footer {
  border-top-color: #2a2a4a;
}

body.dark-mode .post-tags a {
  color: #7cb8f7;
}

/* Read more link */
body.dark-mode .read-more a {
  color: #7cb8f7;
}

/* Post navigation */
body.dark-mode .post-nav-item a {
  color: #b8b8c8;
}

body.dark-mode .post-nav-item a:hover {
  color: #7cb8f7;
}

/* Blockquote */
body.dark-mode blockquote {
  background-color: rgba(124, 184, 247, 0.08);
  border-left-color: rgba(124, 184, 247, 0.3);
  color: #c0c0d0;
}

/* Code */
body.dark-mode code {
  background-color: #2a2a4a;
  color: #e06c75;
}

body.dark-mode pre {
  background-color: #0d1117;
}

body.dark-mode pre code {
  background-color: transparent;
  color: #d4d4dc;
}

body.dark-mode .highlight {
  background-color: #0d1117;
}

body.dark-mode .highlight table,
body.dark-mode .highlight tr,
body.dark-mode .highlight td {
  background-color: #0d1117;
  border: none;
}

/* Tables */
body.dark-mode table {
  border-color: #2a2a4a;
}

body.dark-mode table th {
  background-color: #16213e;
  color: #e8e8f0;
  border-color: #2a2a4a;
}

body.dark-mode table td {
  border-color: #2a2a4a;
}

body.dark-mode table tr:nth-child(even) {
  background-color: rgba(42, 42, 74, 0.3);
}

/* Images */
body.dark-mode img {
  opacity: 0.9;
}

/* Horizontal rule */
body.dark-mode hr {
  border-color: #2a2a4a;
}

/* Archive page */
body.dark-mode .archive-title {
  color: #e8e8f0;
}

body.dark-mode .archive-post {
  border-left-color: #3a3a5a;
}

body.dark-mode .archive-post:hover {
  border-left-color: #7cb8f7;
}

body.dark-mode .archive-post-link {
  color: #b8b8c8;
}

body.dark-mode .archive-post-time {
  color: #6868a0;
}

body.dark-mode .collection-title {
  color: #e8e8f0;
}

/* Terms (tags) page */
body.dark-mode .terms-title {
  border-bottom-color: #7cb8f7;
  color: #e8e8f0;
}

/* Pagination */
body.dark-mode .pagination .page-number {
  color: #b8b8c8;
}

body.dark-mode .pagination .page-number.current {
  color: #7cb8f7;
}

body.dark-mode .pagination a {
  color: #7cb8f7;
}

/* Footer */
body.dark-mode .footer {
  background-color: #16213e;
  color: #8888a0;
}

body.dark-mode .footer a {
  color: #7cb8f7;
}

body.dark-mode .copyright {
  color: #6868a0;
}

/* Back to top */
body.dark-mode .back-to-top {
  background-color: #2a2a4a;
  color: #b8b8c8;
}

body.dark-mode .back-to-top:hover {
  background-color: #3a3a5a;
}

/* Social icons */
body.dark-mode .iconfont {
  color: #b8b8c8;
}

body.dark-mode .iconfont:hover {
  color: #7cb8f7;
}

/* Share buttons & related posts */
body.dark-mode .post-share,
body.dark-mode .related-posts {
  border-color: #2a2a4a;
}

body.dark-mode .share-label {
  color: #8888a0;
}

body.dark-mode .related-date {
  color: #6868a0;
}

body.dark-mode .related-posts h3 {
  color: #e8e8f0;
}

/* Post comments border */
body.dark-mode .post-comments {
  border-color: #2a2a4a;
}

/* Selection */
body.dark-mode ::selection {
  background: rgba(124, 184, 247, 0.3);
  color: #fff;
}

/* Scrollbar */
body.dark-mode::-webkit-scrollbar {
  background-color: #1a1a2e;
}

body.dark-mode::-webkit-scrollbar-thumb {
  background-color: #3a3a5a;
}

/* Smooth transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header, .footer, .post, .content-wrapper, .container, .main,
.mobile-navbar, .mobile-menu, .back-to-top {
  transition: background-color 0.3s ease, color 0.3s ease;
}

a, .menu-item-link, .logo, .iconfont {
  transition: color 0.3s ease;
}
