/**
 * wonk-edu | Shared Styles
 * Gemeinsame CSS-Regeln für alle Seiten
 */

/* Base */
body {
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Card hover (index page) */
.card-link {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(13, 31, 45, 0.1);
}

/* Custom select dropdown arrow */
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B8A99' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* Chart styles (regression) */
.ax { stroke: #0D1F2D; stroke-width: 1.5; }
.grid { stroke: #D1E5EB; stroke-width: 0.5; }
.dot { fill: #4090A8; stroke: #1B3A4B; stroke-width: 1.2; transition: r .15s, fill .15s; }
.dot:hover { r: 9; fill: #55B5C8; }
.dot.dragging { fill: #CC4425; r: 7; }
.err-sq { fill: #CC4425; opacity: 0.10; stroke: #CC4425; stroke-width: 0.5; stroke-opacity: 0.25; }
.err-line { stroke: #CC4425; stroke-width: 1; opacity: 0.5; }
.reg { fill: none; stroke: #55B5C8; stroke-width: 3; stroke-linecap: round; }
.label { font: 500 13px 'Work Sans', sans-serif; fill: #6B8A99; }
.tick { font: 400 11px 'Work Sans', sans-serif; fill: #6B8A99; }

/* Slider accent */
input[type=range] { accent-color: #4090A8; }

/* ==================== HEADER & FOOTER (no Tailwind) ==================== */
.wk-header, .wk-footer {
  background: #0D1F2D;
  color: #fff;
}
.wk-footer { padding: 2rem 0; margin-top: 2.5rem; }

.wk-header-inner, .wk-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wk-footer-inner {
  padding: 0 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .wk-header-inner, .wk-footer-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 768px) {
  .wk-footer-inner { flex-direction: row; }
}

.wk-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.wk-logo img { height: 2.25rem; width: auto; display: block; }
.wk-logo-text { line-height: 1.1; }
.wk-logo-tag { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.01em; font-weight: 500; }

/* ==================== MENU (Dropdown) ==================== */
.wk-menu { position: relative; }

.wk-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  cursor: pointer;
  font: 600 0.875rem 'Work Sans', system-ui, sans-serif;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wk-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.18);
}
.wk-menu-trigger .wk-menu-icon { display: inline-flex; }
.wk-menu-trigger .wk-menu-icon svg { width: 16px; height: 16px; }
.wk-menu-chevron {
  width: 11px;
  height: 11px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.wk-menu[data-open="true"] .wk-menu-trigger {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.2);
}
.wk-menu[data-open="true"] .wk-menu-chevron { transform: rotate(180deg); }

.wk-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #D1E5EB;
  border-radius: 0.75rem;
  padding: 0.4rem;
  box-shadow: 0 12px 32px rgba(13, 31, 45, 0.18), 0 2px 8px rgba(13, 31, 45, 0.06);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}
.wk-menu[data-open="true"] .wk-menu-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wk-menu-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  color: #0D1F2D;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.wk-menu-link svg {
  width: 16px;
  height: 16px;
  color: #4090A8;
  flex-shrink: 0;
}
.wk-menu-group {
  padding: 0.5rem 0.7rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6B8A99;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid #D1E5EB;
  margin-top: 0.25rem;
}
.wk-menu-group:first-child {
  border-top: none;
  margin-top: 0;
}
.wk-menu-link:hover { background: #F0F8FA; }
.wk-menu-link.is-active {
  background: linear-gradient(135deg, #CC4425 0%, #E15938 100%);
  color: #fff;
  font-weight: 600;
  cursor: default;
}
.wk-menu-link.is-active svg { color: #fff; }

@media (max-width: 640px) {
  .wk-logo-tag { display: none; }
  .wk-menu-trigger { padding: 0.45rem 0.7rem; font-size: 0.8125rem; }
  .wk-menu-panel { right: -0.5rem; min-width: 220px; }
}

.wk-footer-text { color: rgba(255, 255, 255, 0.5); font-size: 0.875rem; }
.wk-footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.wk-footer-hsbi {
  height: 2rem;
  width: auto;
  opacity: 0.5;
}

/* ==================== PRESENTATION MODE ==================== */
/* All slide layout is handled via inline styles in shared.js.
   This CSS only styles the overlay UI elements. */

/* Logos top-left */
.pres-logos {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.pres-logo-hsbi {
  height: 1.75rem;
  width: auto;
  opacity: 0.5;
  transition: opacity .2s;
}
.pres-logo-hsbi:hover { opacity: 0.85; }

.pres-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity .2s;
}
.pres-logo:hover { opacity: 0.85; }
.pres-logo img { height: 1.75rem; width: auto; display: block; }
.pres-logo span {
  font: 700 1rem 'Work Sans', system-ui, sans-serif;
  color: #fff;
  letter-spacing: -0.02em;
}
.pres-logo strong { color: #4090A8; }
.pres-logo em { font-style: normal; font-weight: 400; opacity: 0.5; }

/* Progress bar */
.pres-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #4090A8, #55B5C8);
  transition: width .35s ease;
}

/* Exit button */
.pres-exit {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.pres-exit:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Controls bottom-right */
.pres-controls {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Work Sans', system-ui, sans-serif;
}
.pres-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  font-size: 0;
}
.pres-controls button:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.pres-controls button:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.pres-counter {
  color: rgba(255,255,255,.5);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}

/* Header toggle button */
.wk-present-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0.5rem;
  cursor: pointer;
  font: 600 0.75rem 'Work Sans', system-ui, sans-serif;
  transition: background .15s, color .15s, border-color .15s;
}
.wk-present-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.wk-present-btn svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .pres-controls { bottom: 0.75rem; right: 0.75rem; }
  .wk-present-btn span { display: none; }
}

/* ==================== EMBED MODE (iFrame in WP) ==================== */

/* Navigation bar — top of content, left-aligned */
.wk-embed-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0 0.75rem;
}
.wk-embed-bar .wk-menu-trigger {
  background: none;
  color: #0D1F2D;
  border: 1.5px solid #D1E5EB;
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  border-radius: 0.6rem;
}
.wk-embed-bar .wk-menu-trigger:hover {
  background: none;
  border-color: #4090A8;
  color: #4090A8;
}
.wk-embed-bar .wk-menu-chevron { color: #6B8A99; }
.wk-embed-bar .wk-menu-icon svg { color: #4090A8; }

/* Inline presentation button — at bottom of content */
.wk-embed-present {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: #0D1F2D;
  color: #fff;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  font: 600 0.8125rem 'Work Sans', system-ui, sans-serif;
  transition: background .15s;
}
.wk-embed-present:hover {
  background: #1B3A4B;
}
.wk-embed-present svg { width: 15px; height: 15px; }
.wk-embed-present-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 1.5rem 0 0;
}
