/**
 * ReadAgora Base Styles — aligned with here/ design.
 * Global and component-agnostic styles. Uses theme.css variables.
 */

/* Body */
body {
  font-family: var(--font-display);
}

/* Global scrollbar in dark mode (here style) */
.dark ::-webkit-scrollbar {
  width: 8px;
}

.dark ::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Scrollbar: hide */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Scrollbar: custom (primary-themed) */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--scrollbar-track, transparent);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Thin scrollbar variant (e.g. storyview, reader) */
.custom-scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar-thin::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

.custom-scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Chapter editor writing area (here/edit-chapter.html) */
.writing-canvas::-webkit-scrollbar {
  width: 8px;
}
.writing-canvas::-webkit-scrollbar-track {
  background: transparent;
}
.writing-canvas::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

/* Components */
.story-card-shadow {
  box-shadow: var(--shadow-story-card);
}

.hero-blur {
  backdrop-filter: blur(40px);
  background: var(--hero-blur-bg);
}

.serif-title {
  font-family: var(--font-serif);
}

.reading-container {
  max-width: var(--reading-container-max-width);
}

/* Card / section blocks (here-style) */
.card-style {
  background: var(--neutral-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.section-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .section-card {
    padding: 2rem;
  }
}

/* Primary button style */
.btn-primary {
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-xl);
  transition: filter 0.2s, transform 0.1s;
  box-shadow: 0 4px 14px var(--primary-glow-soft);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Outline button */
.btn-outline {
  border: 1px solid var(--border-primary-subtle);
  color: var(--primary);
  background: transparent;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-xl);
  transition: background 0.2s, border-color 0.2s;
}

.btn-outline:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--border-primary-strong);
}
