:root{
    --main-highlight-color: #4da6ff;
    --main-active-color: #fff3b0; 

    --sidebar-background: #f5f4f0;

    /* Color variables */
    --bg-color: #faf9f7;
    --text-color: #1a1a1a;
    --muted-color: #666;
    --muted-light-color: #888;
    --border-color: #d8d5d0;
    --highlight-color: #005fcc;
    --highlight-hover-color: #0047a3;
    --active-color: #feee91;
    --sidebar-bg: #f5f4f0;
    --controls-bg: #f0f0ec;
    --controls-border: #ccc;
    --kbd-bg: #fff;
    --kbd-border: #999;
    --sentence-hover: #dcdbd9;
    --annotation-bg: #fff;
    --annotation-border: #d8d5d0;
    --dialog-bg: #fff;
    --button-bg: #fff;
    --button-border: #bbb;
    --button-hover: #f5f4f0;

    --record-text: #cc2200;
    --record-hover: #fff5f3;
    --record-active: #cc2200;
}

/* Dark mode */
.dark {
    --bg-color: #1a1a1a;
    --text-color: #faf9f7;
    --muted-color: #ccc;
    --muted-light-color: #aaa;
    --border-color: #555;
    --highlight-color: #4da6ff;
    --active-color: #105053;
    --sidebar-bg: #2a2a2a;
    --controls-bg: #2a2a2a;
    --controls-border: #555;
    --kbd-bg: #444;
    --kbd-border: #777;
    --sentence-hover: #3a3a3a;
     --annotation-bg: #656565;    
    --annotation-border: #888;
    --dialog-bg: #333;
    --button-bg: #333;
    --button-border: #666;
    --button-hover: #444;
    --record-text: #f5a623;
--record-hover: #2a2010;
--record-active: #f5a623;
}




 

/* ── MARK: Screenreader-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── MARK: Basis  */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-color);
  background: var(--bg-color);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--highlight-color);
  color: var(--text-color);
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}

/* ── MARK: Header */
#controls {
  background: var(--controls-bg);
  border-bottom: 1px solid var(--controls-border);
  padding: 0.5rem 2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--text-color);
}

#controls p:first-of-type{
  font-weight: 700;
  font-size: 1rem;
}

#controls kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: monospace;
}

/* ── MARK: Layout  */
.layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  min-height: calc(100vh - 4rem);
}

main {
  padding: 2rem;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

#notes {
  padding: 1rem;
  position: sticky;
  top: 0;
  height: calc(100vh - 4rem); 
  overflow-y: auto;
  background: var(--sidebar-bg);
}

/* ── MARK: Tekst  */
article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.text-meta {
  font-size: 0.9rem;
  color: var(--text-color);
  font-family: system-ui, sans-serif;
  margin-top: 0;
  margin-bottom: 2rem;
}

/* ── MARK: Literatuur veld */
#text:focus {
  outline: 3px solid var(--main-highlight-color);
  outline-offset: 10px;
  border-radius: 3px ;
}

/* ── MARK: Zinnen  */
.sentence {
  cursor: pointer;
  border-left: 4px solid transparent;
  padding: 0.3rem 0.75rem;
  margin: 0;
  border-radius: 0 3px 3px 0;
  transition: background 0.1s;
}

.sentence:hover {
  background: var(--sentence-hover);
}

/* Actieve zin: */
/* Werkt via JS-class, niet :focus — zodat het ook met screenreader zichtbaar is */
.sentence.active {
  background: var(--active-color);
  border-left-color: var(--highlight-color);
  border-radius: 0 9px 9px 0;
}

/* Al geannoteerd:  */
.sentence.annotated {
  /* border-bottom: 2px dashed var(--highlight-color); */
  &::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 6px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='30' rx='20' ry='13' fill='%234da6ff'/%3E%3Cellipse cx='18' cy='36' rx='11' ry='9' fill='%234da6ff'/%3E%3Cellipse cx='46' cy='36' rx='11' ry='9' fill='%234da6ff'/%3E%3Cellipse cx='32' cy='40' rx='18' ry='9' fill='%234da6ff'/%3E%3Ccircle cx='20' cy='52' r='4' fill='%234da6ff'/%3E%3Ccircle cx='27' cy='57' r='3' fill='%234da6ff'/%3E%3Ccircle cx='33' cy='60' r='2' fill='%234da6ff'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
} 
#page-nav{
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.sentence.active.annotated {
}

/* ── MARK: Annotaties sectie  */
#sidebar{
    padding: 2rem;
    background-color: var(--sidebar-bg);
}

#notes:focus {
  outline: 3px solid var(--highlight-color);
  outline-offset: 2px;
  border-radius: 10px ;
}

#notes h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

#annotation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.annotation-zin {
  font-size: 0.85rem;
  color: #FFF;
  font-style: italic;
  border-left: 3px solid var(--highlight-color);
  padding-left: 0.5rem;
  margin: 0 0 0.5rem;
}

.annotation-card {
  background: var(--annotation-bg);
  border: 1px solid var(--annotation-border);
  /* border-left: 4px solid var(--main-highlight-color); */
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}


.annotation-card.active {
  outline: 3px solid var(--highlight-color);
  outline-offset: 2px;
  background-color: var(--active-color);
}

.annotation-card h3 {
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
  margin: 0 0 0.25rem;
}

.annotation-card h3 a {
  color: var(--highlight-color);
  text-decoration: none;
}
.annotation-card h3 a:hover,
.annotation-card h3 a:focus {
  text-decoration: underline;
}

.annotation-date {
  font-size: 0.8rem;
  color: var(--muted-light-color);
  font-family: system-ui, sans-serif;
  margin: 0 0 0.5rem;
}

.annotation-text {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.annotation-card audio {
  display: block;
  margin-top: 0.75rem;
  width: 100%;
}

/* MARK: Chapters */
.filter-btn {
  background: var(--button-bg);
  color: var(--text-color);
  border-color: var(--button-border);
  margin-right: 0.4rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
}

.filter-btn:hover {
  background: var(--button-hover);
}

.filter-btn--active {
  background: var(--active-color);
  border-color: var(--highlight-color);
  color: var(--text-color);
  font-weight: 600;
}

/* ── MARK: Dialoog  */
dialog {
  max-width: 38rem;
  width: 92%;
  padding: 2rem;
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  background: var(--dialog-bg);
  font-family: system-ui, sans-serif;
  color: var(--text-color);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

dialog h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--text-color);
}

#dialog-sentence {
  background: var(--sidebar-bg);
  border-left: 4px solid var(--highlight-color);
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  border-radius: 0 4px 4px 0;
}

/* ── MARK: Formulier  */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: Georgia, serif;
  border: 1px solid var(--button-border);
  border-radius: 4px;
  background-color: #a8a7a7;
  resize: vertical;
}

.form-group textarea:focus {
  outline: 3px solid var(--highlight-color);
  outline-offset: 1px;
}

.hint {
  font-size: 0.825rem;
  color: var(--muted-light-color);
  margin: 0.35rem 0 0;
}

/* ── MARK: Knoppen  */
button {
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

button:focus {
  outline: 3px solid var(--highlight-color);
  outline-offset: 2px;
}

#save-btn {
  background: var(--active-color);
  color: var(--text-color);
  border-color: var(--highlight-color);
}
#save-btn:hover {
  background: var(--highlight-hover-color);
  border-color: var(--highlight-hover-color);
}

#cancel-btn {
  background: var(--button-bg);
  color: var(--text-color);
  border-color: var(--button-border);
}
#cancel-btn:hover {
  background: var(--button-hover);
}

#record-btn {
  background: var(--button-bg);
  color: var(--record-text);
  border-color: var(--record-text);
}
#record-btn:hover {
  background: var(--record-hover);
}

/* Tijdens opname: rode achtergrond als visuele waarschuwing */
#record-btn[data-recording="true"] {
  background: var(--record-active);
  color: var(--text-color);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* Theme toggle */
#theme-toggle {
  margin-left: auto;
  display: block;
  background: var(--highlight-color);
  color: var(--text-color);
  border: 2px solid var(--highlight-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

#theme-toggle:hover {
  background: var(--highlight-hover-color);
}

#theme-toggle:focus {
  outline: 3px solid var(--highlight-color);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
