/*
  IDG Session Tool – gemeinsames Stylesheet.
  Mobile-first, responsiv (fluid mit rem/%/clamp), keine Build-Schritte,
  kein Framework – passend zur Stack-Entscheidung (siehe datenmodell.md).
*/

:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #1E1B18;
  --ink-soft: rgba(30, 27, 24, .62);
  --divider: rgba(30, 27, 24, .12);
  --being: #d4b88c;
  --thinking: #e585a1;
  --relating: #ef4136;
  --collaborating: #ff7e2a;
  --acting: #661a30;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3, .display { font-family: 'Manrope', system-ui, sans-serif; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--acting); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 56px) clamp(16px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

/* --- Header / Brand --- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand__logo {
  width: clamp(40px, 6vw, 56px);
  height: clamp(40px, 6vw, 56px);
  flex: none;
  object-fit: contain;
}

.brand__titles { min-width: 0; }

.brand__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}

.brand__subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}

.lang-switch { display: flex; gap: 8px; }
.lang-switch a {
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.lang-switch a.is-active { background: var(--ink); color: #fff; }
.lang-switch a.is-active:hover { color: #fff; }

/* --- Intro / zweiter Block --- */
.intro__eyebrow {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  margin: 0;
}

.intro__teaser {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  overflow: hidden;
}

.video-card__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #efe9e0, #e2dcd2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(30, 27, 24, .85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__body { padding: 14px 18px; }
.video-card__label { font-weight: 700; font-size: 15px; }
.video-card__meta { font-size: 13px; color: var(--ink-soft); }

.overview-graphic { display: flex; flex-direction: column; gap: 10px; }
.overview-graphic__caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.overview-graphic img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* --- Aktionen (Session starten/aktiv) --- */
.actions { display: flex; flex-direction: column; gap: 24px; }
.actions__buttons { display: flex; flex-wrap: wrap; gap: 16px; }

.btn-primary, .btn-secondary {
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
.btn-primary { background: var(--ink); color: #fff; padding: 16px 30px; }
.btn-primary:hover { background: var(--acting); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--divider); padding: 15px 28px; }
.btn-secondary:hover { border-color: var(--ink); }

.picks-field { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.picks-field__label { font-size: 14px; color: var(--ink-soft); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper-btn {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--divider);
  font-size: 20px; font-weight: 700; color: var(--ink);
}
.stepper-btn:hover { border-color: var(--ink); }
.picks-value { font-size: 20px; font-weight: 800; min-width: 24px; text-align: center; }

.session-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
  max-width: 620px;
}
.session-panel__qr {
  width: 150px; height: 150px; flex: none;
  background: #fff; border: 1px solid var(--divider); border-radius: 12px;
  padding: 8px;
}
.session-panel__qr canvas { width: 100%; height: 100%; }
.session-panel__eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 6px;
}
.session-panel__join-code { font-size: 14px; color: var(--ink-soft); word-break: break-all; }

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; justify-content: space-between; }
}

/* =====================================================================
   Mobil-Abstimmungsseite (/vote/{join_code}) – templates/vote.php +
   assets/js/vote.js. Für Handys gedacht, aber auf größeren Bildschirmen
   (Tablet-Vorschau, Testen am Desktop) in einer schmalen Spalte zentriert.
   ===================================================================== */

.vote-body { background: var(--bg); }

.vote-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 18px clamp(20px, 4vh, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vote-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vote-topbar__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.vote-app { display: flex; flex-direction: column; flex: 1; gap: 16px; }

/* --- Übersicht: 5 Dimensions-Karten --- */
.vote-overview { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.vote-overview__title { font-size: clamp(21px, 5vw, 25px); font-weight: 800; margin: 0; line-height: 1.25; }

.dim-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  transition: box-shadow .15s ease, transform .1s ease;
}
.dim-card:active { transform: scale(.98); }
/* Die Dimensions-Icons (dimensions/{key}.png) sind einfarbig in der jeweiligen
   Dimensionsfarbe gehalten – auf der gleichfarbigen Karte sonst unsichtbar.
   Filter macht daraus eine helle Silhouette (wie im Wireframe). */
.dim-card__icon { width: 34px; height: 34px; flex: none; filter: brightness(0) invert(1); opacity: .55; }
.dim-card__title { font-weight: 800; font-size: 16.5px; }
.dim-card__subtitle { font-size: 12.5px; opacity: .85; margin-top: 1px; }

.vote-overview__hint { text-align: center; font-size: 12px; color: var(--ink-soft); }
.vote-overview__counter { text-align: center; font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.vote-cta {
  margin-top: auto;
  width: 100%;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 16px;
  font-size: 15.5px;
  font-weight: 700;
  text-align: center;
}
.vote-cta:disabled { background: rgba(30, 27, 24, .2); cursor: default; }
.vote-cta:not(:disabled):hover { background: var(--acting); }

/* --- Dimension-Detail --- */
.vote-dimension { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vote-navbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nav-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(30, 27, 24, .06);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.nav-btn:hover { background: rgba(30, 27, 24, .12); }
.nav-dots { display: flex; gap: 2px; }
.nav-dot-hit { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; pointer-events: none; transition: background .15s ease; }

.dim-header { border-radius: 20px; padding: 18px 20px; margin-bottom: 14px; }
.dim-header__progress { font-size: 12px; font-weight: 700; letter-spacing: .06em; opacity: .8; margin-bottom: 4px; }
.dim-header__title { font-size: clamp(20px, 5vw, 23px); font-weight: 800; }
.dim-header__subtitle { font-size: 13px; opacity: .85; margin-top: 2px; }

.skill-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; min-height: 0; }
.skill-box { border-radius: 18px; padding: 14px 16px; transition: background .15s ease, color .15s ease; }
.skill-row {
  all: unset; display: flex; align-items: center; justify-content: space-between;
  width: 100%; cursor: pointer; gap: 10px;
}
.skill-row__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.skill-icon {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  filter: grayscale(100%) opacity(.55);
  transition: filter .2s ease;
}
.skill-icon.is-checked { filter: none; }
.skill-row__title { font-weight: 700; font-size: 14.5px; }
.check-circle {
  width: 25px; height: 25px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(30, 27, 24, .35);
  transition: border-color .15s ease, background .15s ease;
}
.skill-desc { font-size: 13.5px; line-height: 1.5; margin-top: 10px; opacity: .9; }
.skill-action-btn {
  margin-top: 12px;
  background: rgba(255, 255, 255, .35);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: inherit;
}

.vote-footer-counter {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  font-size: 15px;
  color: var(--ink-soft);
}

/* --- Senden / Bestätigung --- */
.vote-confirm { display: flex; flex-direction: column; flex: 1; gap: 4px; }
.vote-confirm__back { align-self: flex-start; margin-bottom: 4px; }
.vote-confirm__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); }
.vote-confirm__title { font-size: 23px; font-weight: 800; margin: 0 0 12px; }
.confirm-list { display: flex; flex-direction: column; gap: 10px; }
.confirm-card { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 13px 16px; }
.confirm-card__icon { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.confirm-card__title { font-weight: 700; font-size: 14.5px; }
.confirm-card__dim { font-size: 12px; opacity: .8; }

.vote-confirm__footer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.vote-confirm__warning { font-size: 13px; color: var(--acting); text-align: center; font-weight: 600; }
.btn-send {
  width: 100%; background: var(--ink); color: #fff; border-radius: 999px;
  padding: 17px; font-size: 16px; font-weight: 700;
}
.btn-send:hover { background: var(--acting); }
.btn-send:disabled { background: rgba(30, 27, 24, .25); cursor: default; }
.vote-error { font-size: 13px; color: var(--acting); text-align: center; font-weight: 600; }

/* --- Danke-Bildschirm --- */
.vote-thanks {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 18px;
}
.vote-thanks__icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.vote-thanks__title { font-size: 20px; font-weight: 800; }
.vote-thanks__body { font-size: 14px; color: var(--ink-soft); max-width: 280px; }

/* --- Session nicht (mehr) aktiv --- */
.vote-closed {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 18px; padding: 24px;
}
.vote-closed__logo { width: 64px; height: 64px; }
.vote-closed__message { font-size: 15px; color: var(--ink-soft); max-width: 320px; }

/* =====================================================================
   Auswertungsseite (großer Bildschirm, /session/{admin_token}/results) –
   templates/results.php + assets/js/results.js.
   ===================================================================== */

.results-body { background: var(--bg); }

.results-shell {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 24px);
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.results-pdf-note {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.4;
}

.results-cloud {
  position: relative;
  flex: 1;
  min-height: 320px;
  width: 100%;
}

.results-cloud__word {
  position: absolute;
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.15;
  transition: left .5s ease, top .5s ease, font-size .4s ease, opacity .4s ease;
}

.results-cloud__empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 420px;
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
}

.results-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}
.results-footer-bar__count { font-size: 16px; font-weight: 700; }
.results-footer-bar__actions { display: flex; gap: 14px; }
.results-footer-bar .btn-secondary,
.results-footer-bar .btn-primary { padding: 13px 24px; font-size: 14.5px; }

/* --- Modale Dialoge (PDF-Titel, Bestätigung, Danke) --- */
.results-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 24, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.results-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.results-modal__title { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.results-modal__actions { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
.results-modal--left { text-align: left; }
.results-modal__input {
  width: 100%;
  border: 1.5px solid var(--divider);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  margin: 14px 0 20px;
  font-family: inherit;
  box-sizing: border-box;
}
.results-modal__actions--right { justify-content: flex-end; }
