/* global dark-mode background */
html.theme-dark,
body.theme-dark,
.theme-dark .site-body,
.theme-dark .markdown-preview-view {
  --background-primary: #121212;             /* deep neutral black */
  background: var(--background-primary) !important;
}

/* optional: tweak secondary surfaces */
.theme-dark {
  --background-secondary: #1c1c1c;
  --background-modifier-border: #2a2a2a;
  --card-bg: var(--background-secondary);
  --card-border: var(--background-modifier-border);
  --card-radius: 12px;
}



.site-footer a {        /* hide original link */
  display: none !important;
}

.site-footer::after {   /* inject your content */
  content: "© 2025 CXA • Proudly built with Obsidian";
  font-size: 12px;
  color: #666;
  display: block;
  text-align: left;
  padding-left: 1rem;
}

.site-footer {
  text-align: left !important;
}

/* ---------- Retro buttons panel ---------- */
.buttons-panel{
  position: relative;
  border: 2px solid var(--interactive-accent); /* theme‑accent frame */
  padding: 4px;
  margin: 1.5rem 0;
}

/* title label inherits accent colour */

/* --- enforce horizontal scroll --- */
.button-row{
  display: flex;
  flex-wrap: nowrap;              /* never wrap to next line            */
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;             /* hide vertical overflow             */
  padding-bottom: 4px;            /* space for scrollbar                */
  scrollbar-width: thin;          /* Firefox slim bar                   */
  -webkit-overflow-scrolling: touch; /* smooth momentum on mobile      */
}

/* keep every link + image from shrinking */
.button-row a{
  flex: 0 0 auto;                 /* fixed-width flex item              */
}
.button-row img{
  width: 88px;
  height: 31px;
  flex-shrink: 0;                 /* absolutely no squishing            */
  image-rendering: pixelated;     /* keep the retro crispness           */
}

.internal-embed .markdown-embed-title{ display:none; }

.index-hero {
  margin: 0;
  padding: 0;
}

.index-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  image-rendering: auto;
}

body[data-path="index"] .markdown-preview-view .markdown-preview-section img {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.changelog-scroll {
  display: block;
  height: auto;
  max-height: 200px;            /* Adjust height as needed */
  overflow-y: auto;
  padding-right: 8px;           /* Space for scrollbar */
  scrollbar-width: thin;        /* Firefox */
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.changelog-scroll ul {
  margin: 0;
  padding-left: 1rem;
  list-style-type: disc;
  overflow-y: auto;
  max-height: 200px;
}

.internal-embed[src*="y2kill.mp4"] video {
  max-width: 50%; 
  height: auto;
  margin: 0 auto;
  display: block;
}

.about-image {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  max-width: 40%;
  clear: both;
}

@media (max-width: 700px) {
  .about-image {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 70%;
  }
}

/* Collapsible containers — styled to match site cards */
.callout[data-callout="abstract"] {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}
.callout[data-callout="abstract"] .callout-title {
  background: transparent;
  padding: .65rem .9rem;
  font-weight: 700;
  margin: 0;
  border-bottom: 1px solid var(--card-border);
  position: relative;
  color: var(--interactive-accent);
}
.callout[data-callout="abstract"] .callout-title:hover {
  color: var(--text-accent-hover, var(--interactive-accent));
}
/* Hide default callout emoji/icon */
.callout[data-callout="abstract"] .callout-icon {
  display: none;
}
/* Custom +/- toggle glyph */
.callout.is-collapsible .callout-title::after {
  content: "+";
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  line-height: 1;
}
.callout.is-collapsible:not(.is-collapsed) .callout-title::after {
  content: "−";
}
.callout[data-callout="abstract"] .callout-content {
  padding: .75rem .9rem .9rem;
}
.callout[data-callout="abstract"] .callout-content h3 {
  margin: .2rem 0 .35rem;
  font-size: 1rem;
}
.callout[data-callout="abstract"] .callout-content p {
  margin: .25rem 0 .6rem;
  line-height: 1.4;
}
.callout[data-callout="abstract"] .callout-content hr {
  opacity: .18;
  margin: .6rem 0;
  border-color: var(--card-border);
}

/* --- RESTORE POINT: before adding smooth expand/collapse animation --- */

/* Smooth expand/collapse for callouts */
.callout.is-collapsible .callout-content {
  display: grid;                     /* enables 0fr → 1fr trick */
  grid-template-rows: 1fr;           /* expanded */
  transition: grid-template-rows .28s ease, opacity .28s ease;
  opacity: 1;
}
.callout.is-collapsible .callout-content > * {
  overflow: hidden;
}

/* Collapsed state */
.callout.is-collapsible.is-collapsed .callout-content {
  grid-template-rows: 0fr;
  opacity: 0;
}

/* Optional: animate the +/- glyph */
.callout.is-collapsible .callout-title::after {
  transition: transform .25s ease, opacity .25s ease;
}
.callout.is-collapsible.is-collapsed .callout-title::after {
  transform: rotate(0deg);
  opacity: .85;
}
.callout.is-collapsible:not(.is-collapsed) .callout-title::after {
  transform: rotate(0deg);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .callout.is-collapsible .callout-content,
  .callout.is-collapsible .callout-title::after {
    transition: none !important;
  }
}


/* Horizontal scroll galleries */
.scroll-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-gallery img {
  border-radius: 8px;
  scroll-snap-align: start;
  object-fit: cover;
  flex: 0 0 auto;
  max-height: 220px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-gallery img:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Optional: subtle scroll fade edges for large screens */
.scroll-gallery::before,
.scroll-gallery::after {
  content: "";
  flex: 0 0 30px;
  pointer-events: none;
  background: linear-gradient(to right, var(--background-primary) 0%, transparent 100%);
}

.scroll-gallery::after {
  background: linear-gradient(to left, var(--background-primary) 0%, transparent 100%);
}