/* Cookie consent bar — slim, bottom of page, not a modal */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface, #ffffff);
  border-top: 1px solid var(--border, #d4cfc6);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 200;
  font-family: 'Noto Serif', Georgia, serif;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.cookie-text {
  font-size: 0.82rem;
  color: var(--text-muted, #6b6b6b);
  line-height: 1.5;
  flex: 1;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-accept {
  background: var(--accent, #c0392b);
  color: var(--bg, #f5f2eb);
  border: 2px solid var(--accent, #c0392b);
  border-radius: 5px;
  padding: 0.35rem 1rem;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.cookie-accept:hover {
  background: #a93226;
  border-color: #a93226;
}

.cookie-reject {
  background: transparent;
  color: var(--text-muted, #6b6b6b);
  border: 1px solid var(--border, #d4cfc6);
  border-radius: 5px;
  padding: 0.35rem 1rem;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

/* Hover on reject: warn */
.cookie-reject::after {
  content: "This course won\2019t work without cookies";
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--surface, #fff);
  color: var(--accent, #c0392b);
  border: 1px solid var(--accent, #c0392b);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.cookie-reject:hover::after {
  opacity: 1;
}
.cookie-reject:hover {
  border-color: var(--accent, #c0392b);
  color: var(--accent, #c0392b);
}

/* Footer notes */
.cookie-footer-note {
  color: var(--text-light, #999);
  font-size: 0.75rem;
}
.cookie-footer-warning {
  color: var(--accent, #c0392b);
}

/* Dark mode */
html.dark .cookie-bar {
  background: var(--surface);
  border-top-color: var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}
html.dark .cookie-accept {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
html.dark .cookie-accept:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
}
html.dark .cookie-reject::after {
  background: var(--surface);
}

@media (max-width: 600px) {
  .cookie-bar {
    flex-direction: column;
    text-align: center;
    padding: 0.75rem 1rem;
  }
}
