/* PUBMEM Base - CSS variables, theme colors, media queries */

:root {
  --primary: #58a6ff;
  --primary-hover: #ff9a56;
  --gh-bg: #0d1117;
  --gh-bg-subtle: #161b22;
  --gh-text: #c9d1d9;
  --gh-text-subtle: #8b949e;
  --gh-border: #21262d;
  --gh-blue: #58a6ff;
  --gh-orange: #ff9a56;
  --content-width: 100%;
  --tooltip-delay: 1200ms;
}

/* Tooltip delay - override Pico */
[data-tooltip]::before,
[data-tooltip]::after {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
  transition-delay: 0ms !important;
}
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1 !important;
  visibility: visible !important;
  transition-delay: var(--tooltip-delay) !important;
}

/* Responsive content width */
@media (min-width: 576px) { :root { --content-width: 510px; } }
@media (min-width: 768px) { :root { --content-width: 700px; } }
@media (min-width: 1024px) { :root { --content-width: 950px; } }
@media (min-width: 1280px) { :root { --content-width: 1200px; } }
@media (min-width: 1536px) { :root { --content-width: 1450px; } }

/* Override Pico CSS colors to GitHub dark theme */
[data-theme="dark"] {
  --pico-primary: #58a6ff;
  --pico-primary-hover: #ff9a56;
  --pico-background-color: #0d1117;
  --pico-card-background-color: #0d1117;
  --pico-muted-border-color: #21262d;
  --pico-color: #c9d1d9;
  --pico-muted-color: #8b949e;
  --pico-code-background-color: #161b22;
}

/* Light theme - high contrast colors */
[data-theme="light"] {
  --gh-bg: #ffffff;
  --gh-bg-subtle: #f6f8fa;
  --gh-text: #1f2328;
  --gh-text-subtle: #59636e;
  --gh-border: #d1d9e0;
  --gh-blue: #0969da;
  --gh-orange: #bc4c00;
}
[data-theme="light"] .entry-card {
  background: #ffffff;
  border-color: #d1d9e0;
}
[data-theme="light"] .activity-preview {
  background: #ffffff;
  border-color: #8b7355;
}
[data-theme="light"] .detail-content {
  background: #f6f8fa;
}
[data-theme="light"] .header h1 a,
[data-theme="light"] .header h1 {
  color: #1f2328;
}
[data-theme="light"] .version {
  color: #59636e;
}

/* Light mode contrast fixes for card elements */
[data-theme="light"] .entry-author,
[data-theme="light"] .entry-time,
[data-theme="light"] .entry-chars,
[data-theme="light"] .entry-user {
  color: #4b5563;
}
[data-theme="light"] .entry-preview {
  color: #374151;
}
[data-theme="light"] .entry-model {
  color: #9a3412;
}
[data-theme="light"] .all-loaded {
  color: #4b5563;
}

/* Reset main padding */
main {
  padding-top: 0 !important;
}

/* Buttons - minimal */
button.secondary {
  --pico-background-color: transparent;
  --pico-border-color: var(--pico-muted-border-color);
  --pico-color: var(--pico-muted-color);
}
button.secondary:hover {
  --pico-border-color: var(--pico-primary);
  --pico-color: var(--pico-primary);
}
