/*
Theme Name: Fictioneer Child
Description: Starter child theme for Fictioneer with a full-width home template, a light-blue accent layer, and a site-wide scroll progress bar. Requires the Fictioneer parent theme (5.35.3 or later). Put your custom styles here instead of editing the parent theme, so updates stay safe.
Author: xiazixin
Author URI: https://xiaz.dev
Template: fictioneer
Version: 1.4.0
Requires at least: 6.5.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v3.0 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: fictioneer-child
*/

/* =============================================================================
   FICTIONEER CHILD THEME
   =============================================================================

   This file is enqueued by inc/enqueue.php at priority 99999, after the parent
   theme's application stylesheet and after the styles generated by the
   Customizer. Ordinary rules therefore override the parent without !important.

   Fictioneer exposes its design tokens as CSS custom properties on :root.
   Overriding those is usually cleaner than targeting individual elements.
   Look at the parent theme's css/application-properties.css or use the browser
   inspector to find the token you need.

   Example overrides (uncomment and adjust):

   :root {
     --site-width: 1080px;
     --layout-border-radius-small: 4px;
   }

   .story__header {
     background-color: #101114;
   }

   .site-title a:hover {
     opacity: 0.8;
   }

   Keep the Customizer's "Additional CSS" for quick experiments; put anything
   permanent, documented, or version-controlled in this file instead.
   ============================================================================= */

/* =============================================================================
   LIGHT BLUE ACCENT TOKENS
   =============================================================================

   The child theme's accent is light blue. The values switch automatically with
   Fictioneer's own light/dark mode attribute, so one accent works on both
   backgrounds without overriding the parent theme's background, text, button,
   link, or border palettes.

   Override these tokens in this file (or in Customizer > Additional CSS) to
   tune the accent without touching anything else.
   ============================================================================= */

:root {
  --fc-child-lightblue: #add8e6;
  --fc-child-lightblue-bright: #d3f1fb;
  --fc-child-lightblue-deep: #74bed6;
  --fc-child-lightblue-glow: rgba(173, 216, 230, 0.35);
  --fc-child-lightblue-wash: rgba(173, 216, 230, 0.12);
  --fc-child-lightblue-ink: #06212c;
}

:root[data-mode="light"] {
  --fc-child-lightblue: #7cc4dc;
  --fc-child-lightblue-bright: #b9e6f3;
  --fc-child-lightblue-deep: #2a7d99;
  --fc-child-lightblue-glow: rgba(63, 155, 184, 0.25);
  --fc-child-lightblue-wash: rgba(63, 155, 184, 0.10);
}

/* =============================================================================
   SITE-WIDE SCROLL PROGRESS BAR
   =============================================================================

   The markup is created by js/scroll-progress.js. The bar is fixed to the
   bottom edge so it never collides with Fictioneer's chapter progress bar,
   which sits at the top on chapter pages.
   ============================================================================= */

.fc-scroll-progress {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  height: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.fc-scroll-progress.is-active {
  opacity: 1;
}

.fc-scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background-image: linear-gradient(
    90deg,
    var(--fc-child-lightblue-deep),
    var(--fc-child-lightblue) 55%,
    var(--fc-child-lightblue-bright)
  );
  box-shadow:
    0 -1px 10px var(--fc-child-lightblue-glow),
    0 0 3px var(--fc-child-lightblue);
  transition: transform 100ms linear;
  will-change: transform;
}

[dir="rtl"] .fc-scroll-progress__bar {
  transform-origin: right center;
}

/* =============================================================================
   LIGHT BLUE ACCENTS
   ============================================================================= */

::selection {
  background-color: var(--fc-child-lightblue);
  color: var(--fc-child-lightblue-ink);
  text-shadow: none;
}

/* Fictioneer scopes selection to :root[data-mode=dark] body, which is more
   specific than a plain ::selection rule. Match that specificity so the accent
   applies in both modes. */
:root body ::selection,
:root[data-mode] body ::selection {
  background-color: var(--fc-child-lightblue);
  color: var(--fc-child-lightblue-ink);
  text-shadow: none;
}

.chapter__content blockquote {
  border-inline-start: 2px solid var(--fc-child-lightblue);
}

/* =============================================================================
   ACCESSIBILITY / PRINT
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  .fc-scroll-progress,
  .fc-scroll-progress__bar {
    transition: none;
  }
}

@media print {
  .fc-scroll-progress {
    display: none !important;
  }
}

/* Add your own custom CSS below this line. */
