/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* optional, prevents horizontal scroll */
}

/* Reserve space below page content while the fixed music player bar is
 * visible, so footer actions (Delete / Update / Back) aren't covered. */
body:has(#music-player-bar:not(.hidden)) main {
  padding-bottom: 6rem;
}

/* The bulk-select action bar is position:fixed, so the `main` padding
 * above doesn't lift it — it would sit under the music player bar. Raise
 * it to clear the player whenever the player is visible. */
body:has(#music-player-bar:not(.hidden)) [data-bulk-select-target="actionBar"] {
  bottom: calc(6rem + env(safe-area-inset-bottom));
}

/* Safe-area (notch / gesture bar) support — viewport-fit=cover is set in
 * the head, so fixed bottom-anchored elements must clear the home
 * indicator themselves. env() resolves to 0 on devices without an inset,
 * leaving desktop untouched. `body` prefix outranks the bottom-* utility
 * so cascade order between stylesheets can't flip the result. */
#music-player-bar,
[data-music-player-target="queueDrawer"] {
  padding-bottom: env(safe-area-inset-bottom);
}

body [data-bulk-select-target="actionBar"] {
  bottom: calc(1rem + env(safe-area-inset-bottom));
}

/* The mobile "+" FAB: keep it above the gesture inset, and lift it clear
 * of the music player bar whenever a track is loaded (same collision the
 * bulk bar handles above — see docs/patterns/ui.md). */
#new-fab {
  bottom: calc(1.875rem + env(safe-area-inset-bottom));
}

body:has(#music-player-bar:not(.hidden)) #new-fab {
  bottom: calc(7rem + env(safe-area-inset-bottom));
}

/* 16px floor on every text-entry control — anything smaller makes iOS
 * Safari auto-zoom the page on focus. */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea {
  font-size: 16px;
}

/* Turbo drives View Transitions (meta[name="view-transition"] in the
 * head). Keep the cross-fade fast so navigation feels snappy rather than
 * animated, and drop it entirely for reduced-motion users. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 150ms;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* Visible keyboard focus everywhere, tokened to the theme so it holds
 * in both solarized variants. :focus-visible only — mouse clicks don't
 * get the ring. */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion: collapse every animation/transition to a single
 * frame. The View Transition rule above handles navigation; this
 * catches the rest (spinner, skeleton pulse, flash slide, queue-drawer
 * slide) without needing per-component opt-outs. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Global-search toggle: ring the search input while it's searching the whole
 * library. `outline` (not box-shadow) so it doesn't fight the input's shadow
 * utility. Paired with the highlighted pill — see filter_controller#toggleScope. */
.is-global-search {
  outline: 2px solid var(--color-warning, #b58900);
  outline-offset: 2px;
  border-radius: 9999px;
}

.github-signin-container {
  background-color: #000;
  transition: background-color 0.3s ease;
  border-radius: 6px;
  border: none;
}

.github-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid #1b1f23;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  width: 100%;
}

.github-signin-btn .github-icon {
  width: 64px;
  margin-right: 8px;
}

.github-signin-btn span {
  font-family: Arial, sans-serif;
  font-size: 16px;
}

.animated-border {
    stroke: var(--color-base-content);
    stroke-dasharray: 711.5;
    stroke-dashoffset: -711.5;
    stroke-width: 3;
    transition: stroke-dashoffset 1s ease-in-out;

    transform: rotate(-270deg);
    transform-origin: 50% 50%;
    stroke-linecap: round;
}

.yin-yang-container {
  width: 100%;
  height: auto
}

.yin-yang-container:hover .animated-border {
    stroke-dashoffset: 0;
}

/* #theme-toggler */
#theme-toggler::before {
  background-color: var(--color-secondary);
}
/* #theme-toggler */
