html,
html.dark {
  color-scheme: light !important;
}

html.dark {
  --background: oklch(98.5% 0.003 85);
  --foreground: oklch(18% 0.005 250);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(18% 0.005 250);
  --popover: oklch(100% 0 0);
  --popover-foreground: oklch(18% 0.005 250);
  --primary: oklch(18% 0.005 250);
  --primary-foreground: oklch(98.5% 0.003 85);
  --secondary: oklch(95.5% 0.005 85);
  --secondary-foreground: oklch(28% 0.005 250);
  --muted: oklch(95.5% 0.005 85);
  --muted-foreground: oklch(45% 0.01 250);
  --accent: oklch(93% 0.008 85);
  --accent-foreground: oklch(18% 0.005 250);
  --destructive: oklch(50% 0.18 25);
  --destructive-foreground: oklch(98.5% 0.003 85);
  --border: oklch(88% 0.006 85);
  --input: oklch(88% 0.006 85);
  --ring: oklch(18% 0.005 250);
  --accent-gold: oklch(74% 0.1 80);
  --sidebar: oklch(98.5% 0.003 85);
  --sidebar-foreground: oklch(18% 0.005 250);
  --sidebar-primary: oklch(18% 0.005 250);
  --sidebar-primary-foreground: oklch(98.5% 0.003 85);
  --sidebar-accent: oklch(93% 0.008 85);
  --sidebar-accent-foreground: oklch(18% 0.005 250);
  --sidebar-border: oklch(88% 0.006 85);
  --sidebar-ring: oklch(18% 0.005 250);
}

.bookstar-rich-text {
  line-height: 1.75;
  overflow-wrap: anywhere;
  text-align: left;
}

.bookstar-rich-text > :first-child {
  margin-top: 0;
}

.bookstar-rich-text > :last-child {
  margin-bottom: 0;
}

.bookstar-rich-text p {
  margin: 0.9rem 0;
}

.bookstar-rich-text h2,
.bookstar-rich-text h3,
.bookstar-rich-text h4,
.bookstar-rich-text h5,
.bookstar-rich-text h6 {
  color: var(--foreground);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 1.8rem 0 0.75rem;
}

.bookstar-rich-text h2 {
  font-size: clamp(1.65rem, 4vw, 2.15rem);
}

.bookstar-rich-text h3 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.bookstar-rich-text h4 {
  font-size: 1.3rem;
}

.bookstar-rich-text h5,
.bookstar-rich-text h6 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
}

.bookstar-rich-text strong {
  color: var(--foreground);
  font-weight: 700;
}

.bookstar-rich-text em {
  font-style: italic;
}

.bookstar-rich-text a {
  color: #0758a8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.bookstar-rich-text a:hover {
  color: #003b75;
}

.bookstar-rich-text ul,
.bookstar-rich-text ol {
  margin: 1rem 0;
  padding-left: 1.6rem;
}

.bookstar-rich-text ul {
  list-style: disc;
}

.bookstar-rich-text ol {
  list-style: decimal;
}

.bookstar-rich-text li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.bookstar-rich-text hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.bookstar-whatsapp-button {
  background-color: #25d366 !important;
  color: #ffffff !important;
}

.bookstar-whatsapp-button:hover {
  background-color: #1ebe5d !important;
}

.bookstar-whatsapp-label {
  position: absolute;
  right: calc(100% + 0.75rem);
  white-space: nowrap;
  border: 1px solid #d7e7dc;
  border-radius: 999px;
  background: #ffffff;
  color: #126b36;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 18px rgb(0 0 0 / 14%);
}

@media (max-width: 640px) {
  .bookstar-whatsapp-label {
    display: none;
  }
}
