/*
@layer components {
  .h1 {
    @apply font-bold text-2xl;
  }
  .btn {
    @apply rounded-full p-1 px-4 border border-black;
  }
} */
/* @supports (padding: max(0px)) {
  body,
  header,
  footer {
    padding-left: min(0vmin, env(safe-area-inset-left));
    padding-right: min(0vmin, env(safe-area-inset-right));
  }
} */
:root {
  --blendmode: normal;
  scrollbar-width: none;
}

/* .invert-grayscale {
  filter: invert(1);
} */
/* @keyframes rotateBox {
  to {
    transform: scale(1.03);
  }
  50% {
    transform: scale(1);
  }
  from {
    transform: scale(0.9);
  }
} */

.wr-hl,
.wr-hlc,
.wr-hlcu {
  transition: all 2.5s ease-in-out;
}
.wr-hl.wr-inline-note-active,
.wr-hlc.wr-inline-note-active,
.wr-hlcu.wr-inline-note-active {
  filter: none !important;
  transition:
    opacity 180ms ease,
    filter 180ms ease !important;
}
.wr-hl {
  stroke-opacity: 0;
  stroke-dasharray: 0;
  fill-opacity: 0.5;
  mix-blend-mode: var(--blendmode);
  filter: blur(0.7px);
}

.wr-hlc {
  stroke-opacity: 0.5;
  stroke-width: 1px;
  fill-opacity: 0.3;
  stroke-dasharray: 6 2;
  stroke-linejoin: bevel;
  mix-blend-mode: var(--blendmode);
  /* mix-blend-mode: multiply; */
}

body.dark g.wr-hlcu {
  stroke-opacity: 0;
  /* stroke-opacity: 0.8; */
  /* stroke-width: 1px; */
  fill-opacity: 0.58;
  /* stroke-dasharray: 6 2; */
  /* stroke-linejoin: bevel; */
  mix-blend-mode: var(--blendmode);
  filter: drop-shadow(4px 4px 4px white) blur(2px);
  /* mix-blend-mode: multiply; */
}
body.light g.wr-hlcu {
  stroke-opacity: 0;
  /* stroke-opacity: 0.8; */
  /* stroke-width: 1px; */
  fill-opacity: 0.5;
  /* stroke-dasharray: 6 2; */
  /* stroke-linejoin: bevel; */
  mix-blend-mode: var(--blendmode);
  filter: drop-shadow(4px 4px 4px black) blur(2px);

  /* mix-blend-mode: multiply; */
}

/* .dark .wr-hl {
  mix-blend-mode: lighten !important;
}

.light .wr-hl,
.light .wr-hlc {
  mix-blend-mode: darken !important;
} */

html {
  /* position: absolute; */
  /* top: 0px; */
  /* margin-top: -50px; */
  /* margin: 0; */
  /* padding: 0; */
  background-color: black;
  color: white;
}

html:has(body.light) {
  background-color: white;
  color: black;
}

html:has(body.dark) {
  background-color: black;
  color: white;
}
/* html {
  background-color: var(--themebg, white);
  color: var(--themefg, black);
} */

/* div.epub-container {
  scroll-behavior: instant;
} */

/* .fullscreen-paginated div.epub-container {
  height: 100vh;
} */

/* div.epub-view {
  height: unset !important;
} */

body {
  margin: 0;
  padding: 0;
  font-family:
    Lato, 'Noto Sans', 'Roboto Flex', 'Inter', 'Segoe UI', Tahoma, Geneva,
    Verdana, sans-serif;
  transition: transform 0.1s ease-out;
}

body.paginated,
body.paginated.fullscreen {
  /* Safe-area insets are handled by rendition sizing; extra body padding causes vertical drift in paginated mode. */
  padding: 0;
}

body.light {
  background-color: white;
  color: black;
}

body.dark {
  background-color: black;
  color: white;
}

body .notebox-popover {
  font-family: 'Noto Sans', Lato, 'Roboto Flex', 'sans-serif';
}

/* div.epub-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  /* transition: top 1s ease-out, bottom 1s ease-out; */

/* div.epub-container.scrolled {
  padding-top: 48px;
  padding-bottom: 48px;
}

div.epub-container.scrolled.fullscreen {
  padding-top: 48px;
  padding-bottom: 48px;
} */

div.epub-container {
  scrollbar-width: none;
}

/* div.epub-container:hover {
  scrollbar-width: thin;
} */

div.epub-container.scrolled::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 100vh;
  pointer-events: none;
  top: 0px;
}

body.dark div.epub-container.scrolled::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0px,
    rgba(0, 0, 0, 0) 24px,
    rgba(0, 0, 0, 0) 98%,
    rgba(0, 0, 0, 1) 100%
  );
}
body.light div.epub-container.scrolled::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0px,
    rgba(255, 255, 255, 0) 24px,
    rgba(255, 255, 255, 0) 98%,
    rgba(255, 255, 255, 1) 100%
  );
}

body.dark div.epub-container.fullscreen.scrolled::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 48px,
    rgba(0, 0, 0, 0) 72px,
    rgba(0, 0, 0, 0) 98%,
    rgba(0, 0, 0, 1) 100%
  );
}

body.light div.epub-container.fullscreen.scrolled::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 48px,
    rgba(255, 255, 255, 0) 72px,
    rgba(255, 255, 255, 0) 98%,
    rgba(255, 255, 255, 1) 100%
  );
}

/* .scrolled div.epub-view:last-child body:last-child :after {*/
/* .scrolled div.epub-view > iframe:after {
  content: "HELLO";
  display: block;
  height: 380px;
  width: 100%;
  background: red;
} */

/* div.epub-container.fullscreen::after {
  top: 0px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
} */
/* div.fullscreen { */
/* margin-top: 50px; */
/* padding-top: 0px;
  padding-top: 0 !important;
  padding-bottom: 0 !important; */
/* margin: 0px; */
/* } */

/* body.dark {
  background-color: black;
  color: white;
} */
/* html {
  margin-top: 0px; */
/* padding-top: env(safe-area-inset-top); */
/* column-gap: 400px !important; */
/* margin-bottom: env(safe-area-inset-bottom); */
/* } */

/* #headerbar {
  height: env(safe-area-inset-top);
  width: 100%;
  position: fixed;
  top: 0;
  /* background-color: black; */
/* color: black; 
} */

/*.no-context-menu {
  -webkit-touch-callout: none !important; /* iOS Safari */
/* -user-select: none! important; /* Safari */
/* -user-select: none !important; */
/* user-select: none !important; */

/* html,
body {
  pointer-events: auto;
} */

/* .scrolled-chapter-container {
  padding-top: 50px;
  padding-bottom: 50px;
} */

/* .scroll-flow p:last-child {
  padding-top: 50px;
  padding-bottom: 50px;
} */

/* .scrolled div.epub-view {
  padding-top: 0px;
  padding-bottom: 0px;
  overflow: visible !important;
  overflow-clip-margin: 0px !important;
}

.scrolled div.epub-view iframe {
  overflow-clip-margin: 0px !important;
  overflow: visible !important;
} */

/* .scrolled.fullscreen div.epub-view {
   margin: -env(safe-area-inset-top) 0 -env(safe-area-inset-bottom); 
  margin: 0;
  padding: 0;
} */
.markdown {
  table {
    border-collapse: collapse;
    border: 2px double rgb(218, 215, 215);
  }

  th,
  td {
    padding: 6px 13px;
    border: 1px solid rgb(218, 215, 215);
  }

  td {
    font-size: 75%;
  }

  p {
    line-height: 1.4;
    /* font-family: "Shantell Sans", "sans-serif"; */
  }

  ul,
  ol {
    padding-left: 1.5em;
  }

  li {
    margin-top: 0em;
    margin-bottom: 0em;
  }

  blockquote {
    margin: 0.9em 0;
    padding: 0.2em 0 0.2em 0.95em;
    border-left: 3px solid rgba(110, 150, 100, 0.35);
    color: inherit;
    opacity: 0.84;
  }

  code {
    padding: 0.14em 0.4em;
    border-radius: 0.45em;
    background: rgba(110, 150, 100, 0.12);
    font-size: 0.92em;
  }

  pre {
    margin: 0.95em 0;
    padding: 0.85em 1em;
    border-radius: 1em;
    border: 1px solid rgba(110, 150, 100, 0.16);
    background: rgba(255, 255, 255, 0.7);
    overflow-x: auto;
  }

  pre code {
    padding: 0;
    background: transparent;
  }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
  }

  img {
    max-width: 100%;
    border-radius: 16px;
  }
}

.notecomponent,
.notebox {
  color: inherit;

  p {
    margin-top: 0em;
    margin-bottom: 0.72em;
    line-height: 1.55;
  }

  p:last-child {
    margin-bottom: 0;
  }

  ul,
  ol {
    margin-top: 0.6em;
    margin-bottom: 0.7em;
  }

  li + li {
    margin-top: 0.22em;
  }
}

.notebox {
  font-family: 'Bricolage Grotesque', sans-serif;
}

.notecomponent {
  font-family: 'Lato', 'Noto Sans', sans-serif;
}

body.dark .markdown code {
  background: rgba(188, 226, 159, 0.12);
}

body.dark .markdown pre {
  background: rgba(16, 20, 17, 0.92);
  border-color: rgba(181, 224, 149, 0.14);
}

.epub-view {
  min-height: 100vh;
}

.epub-view > iframe {
  min-height: 100vh;
}
@keyframes noteOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}
@keyframes noteIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

body {
  overscroll-behavior: none;
}

.drv {
  font-family: sans-serif;
}

.drv .ekz {
  font-family: Petrona, serif;
}

.drv .kap {
  font-size: 175%;
  font-weight: bold;
}

div.drv > div.dif {
  padding: 1em 1em 0em;
}

div.trd::before {
  content: '→ ';
}

.drv .trd {
  font-size: 125%;
  padding-left: 0.25em;
}

.drv ol {
  padding-left: 2em;
}

.drv .ekz ul {
  padding: 0em 0.5em 0.5em 1.5em;
  /* list-style-type: '▸ '; */
}

.drv .ekz ul li {
  font-size: 75%;
  font-style: italic;
}

/* Add these new keyframe animations */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 40px rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }
}

@keyframes arrowPulse {
  0% {
    transform: rotate(inherit) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: rotate(inherit) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: rotate(inherit) scale(1);
    opacity: 0.85;
  }
}

/* Add these theme-specific styles */
body.dark .chapter-skip-indicator {
  --glow-color: rgba(255, 255, 255, 0.3);
}

body.light .chapter-skip-indicator {
  --glow-color: rgba(0, 0, 0, 0.3);
}

@keyframes horizontalRipple {
  0% {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
  }
  100% {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    background-position: -100% 0;
  }
}

@keyframes verticalRipple {
  0% {
    background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    background-size: 100% 200%;
    background-position: 0 100%;
  }
  100% {
    background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    background-size: 100% 200%;
    background-position: 0 -100%;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(var(--x-offset), var(--y-offset));
  }
  50% {
    transform: translate(
      calc(var(--x-offset) + var(--direction) * 10px),
      var(--y-offset)
    );
  }
}

@keyframes fadePulse {
  0%,
  100% {
    opacity: 0.9;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.2);
  }
}

/* path/to/src/components/BookList.css */

.embla {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.embla__viewport {
  overflow: hidden;
  width: 100%;
}

.embla__container {
  display: flex;
}

.embla__slide {
  position: relative;
  min-width: 100%;
  /* padding: 0 10px; */
  box-sizing: border-box;
}

.embla__dots {
  display: flex;
  justify-content: center;
}

/* Shepherd Tour Theming */
.shepherd-element {
  max-width: 400px;
  font-family:
    Lato, 'Noto Sans', 'Roboto Flex', 'Inter', 'Segoe UI', sans-serif;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Light theme */
body.light .shepherd-element {
  background: #f5f5f5;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.light .shepherd-arrow:before {
  background: #f5f5f5;
}

body.light .shepherd-button {
  background: #3f51b5;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  transition: background-color 0.3s ease;
}

body.light .shepherd-button:hover {
  background: #303f9f;
}

/* Dark theme */
body.dark .shepherd-element {
  background: #080808;
  color: #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark .shepherd-arrow:before {
  background: #080808;
}

body.dark .shepherd-button {
  background: #5c6bc0;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  transition: background-color 0.3s ease;
}

body.dark .shepherd-button:hover {
  background: #3f4d99;
}

/* Common styles for both themes */
.shepherd-title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.5em;
}

.shepherd-text {
  font-size: 0.95em;
  line-height: 1.4;
  margin-bottom: 1em;
}

.shepherd-footer {
  padding-top: 0.5em;
}

/* Modal overlay styling */
.shepherd-modal-overlay-container {
  transition: all 0.3s ease;
}

body.light .shepherd-modal-overlay-container {
  background: rgba(0, 0, 0, 0.2);
}

body.dark .shepherd-modal-overlay-container {
  background: rgba(0, 0, 0, 0.5);
}
