/* ==========================================================================
   Wikitube.io — Obsidian Publish stylesheet
   Goal: look as much like Wikipedia (Vector skin) as possible.
   ========================================================================== */

/* ---- Wikipedia typography & colors ------------------------------------- */
.published-container {
  --font-text-theme: "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial",
    "Liberation Sans", sans-serif;
  --font-monospace-theme: "Courier New", monospace;
  --text-normal: #202122;            /* Wikipedia body text */
  --text-muted: #54595d;
  --link-color: #3366cc;             /* Wikipedia link blue */
  --link-color-hover: #3366cc;
  --link-external-color: #3366cc;
  --link-external-color-hover: #3366cc;
  --background-primary: #ffffff;
  --background-secondary: #f8f9fa;   /* Wikipedia sidebar gray */
  --hr-color: #a2a9b1;
  --blockquote-border: #eaecf0;
  --file-line-width: 60em;           /* wide article column, like Wikipedia */
}

body {
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  color: #202122;
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Headings: serif, thin rule underneath (the Wikipedia signature) ---- */
.markdown-preview-view h1,
.markdown-preview-view h2,
.page-header {
  font-family: "Linux Libertine", "Georgia", "Times New Roman", serif;
  font-weight: 400;
  color: #000000;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 0.17em;
  margin-bottom: 0.6em;
}

.markdown-preview-view h1 { font-size: 1.9em; }
.markdown-preview-view h2 { font-size: 1.5em; }

.markdown-preview-view h3,
.markdown-preview-view h4,
.markdown-preview-view h5 {
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  font-weight: 700;
  color: #000000;
  border-bottom: none;
}

/* ---- Links: Wikipedia blue, underline only on hover --------------------- */
.markdown-preview-view a,
.markdown-preview-view a.internal-link,
.markdown-preview-view a.external-link {
  color: #3366cc;
  text-decoration: none;
  background-image: none;   /* remove Publish's external-link icon look */
}

.markdown-preview-view a:hover {
  text-decoration: underline;
}

.markdown-preview-view a.internal-link.is-unresolved {
  color: #dd3333;           /* Wikipedia red link for missing pages */
}

/* ---- Tables: Wikipedia "wikitable" style -------------------------------- */
.markdown-preview-view table {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  font-size: 14px;
}

.markdown-preview-view th {
  background: #eaecf0;
  border: 1px solid #a2a9b1;
  padding: 0.3em 0.6em;
  text-align: center;
  font-weight: 700;
}

.markdown-preview-view td {
  border: 1px solid #a2a9b1;
  padding: 0.3em 0.6em;
}

/* ---- Blockquotes / callouts --------------------------------------------- */
.markdown-preview-view blockquote {
  border-left: 4px solid #eaecf0;
  color: #54595d;
  margin-left: 0;
  padding-left: 1em;
  font-style: normal;
}

/* ---- Code ---------------------------------------------------------------- */
.markdown-preview-view code {
  background: #f8f9fa;
  border: 1px solid #eaecf0;
  color: #000000;
  border-radius: 2px;
}

.markdown-preview-view pre {
  background: #f8f9fa;
  border: 1px solid #eaecf0;
  border-radius: 2px;
}

/* ---- Microsim iframes: thin Wikipedia-style frame ------------------------ */
.markdown-preview-view iframe {
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  background: #ffffff;
  margin: 8px 0 20px 0;
}

/* ---- Left navigation: Wikipedia sidebar gray ----------------------------- */
.published-container .site-body-left-column {
  background: #f8f9fa;
  border-right: 1px solid #a2a9b1;
  font-size: 13px;
}

/* ---- Wikipedia-style header row ------------------------------------------ */
.wikitube-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #a2a9b1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

/* push the site down so the header doesn't cover it */
body.has-wikitube-header .published-container,
body.has-wikitube-header .site-body {
  padding-top: 60px;
}

/* brand: logo + wordmark */
.wt-wordmark {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  line-height: 1.15;
  flex: 0 0 auto;
}

.wt-logo {
  display: flex;
  align-items: center;
}

.wt-words {
  display: flex;
  flex-direction: column;
}

.wt-title {
  font-family: "Linux Libertine", "Georgia", "Times New Roman", serif;
  font-size: 24px;
  letter-spacing: 0.5px;
  color: #000000;
  font-weight: 400;
}

.wt-tagline {
  font-family: "Linux Libertine", "Georgia", "Times New Roman", serif;
  font-size: 11px;
  color: #54595d;
}

/* center search slot */
.wt-search-slot {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
  min-width: 0;
}

.wt-search-slot .search-input-container,
.wt-search-slot > * {
  width: 100%;
  max-width: 460px;
  margin: 0;
}

.wt-search-slot input {
  width: 100%;
  height: 34px;
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  padding: 0 12px;
  font-size: 14px;
}

/* right-side links */
.wt-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.wt-links a {
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  font-size: 14px;
  color: #3366cc;
  text-decoration: none;
}

.wt-links a:hover {
  text-decoration: underline;
}

/* Donate button (inside header) */
.mtn-donate {
  background: #36c;                 /* Wikipedia button blue */
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 2px;               /* square-ish, like Wikipedia buttons */
  border: 1px solid #36c;
}

.mtn-donate:hover {
  background: #447ff5;
  text-decoration: none !important;
}

@media (max-width: 750px) {
  .wt-tagline { display: none; }
  .wt-words { display: none; }        /* keep just the W logo on small screens */
  .wikitube-header { height: 50px; padding: 0 12px; }
  body.has-wikitube-header .published-container,
  body.has-wikitube-header .site-body {
    padding-top: 50px;
  }
  .wt-search-slot { padding: 0 10px; }
  .wt-links { gap: 10px; }
  .mtn-donate { padding: 5px 10px; font-size: 13px; }
}
