/*
 * Olivria Quiz - quiz.css
 */

/* ==========================================================================
   1. Globale Stile & Design Tokens
   ========================================================================== */
:root {
    --color-primary-dark: #133f26;
    --color-background-green: #f1f5e9;
    --color-secondary-green: #E3E8D7;
    --color-text-dark: #000000;
    --color-text-secondary: #5a665e;
    --color-neutral-white: #FFFFFF;
    --color-border: #dcdcdc;
        --color-primary-dark: #133f26;
    --color-background-green: #f1f5e9;
    --color-secondary-green: #E3E8D7;
    --color-text-dark: #000000;
    --color-text-secondary: #5a665e;
    --color-neutral-white: #FFFFFF;
    --color-border: #dcdcdc;
    --color-success: #00B67A;
      --hint-bg: #ffffff;
  --hint-text: #19251f;
  --hint-secondary: #5a665e;
  --hint-accent: #133f26;
  --hint-border: #e6eee9;
  --hint-sage: #ecf4ef;

    --font-primary: 'Inter', sans-serif;
    --font-headings: 'Karla', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--color-background-green);
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   2. Header & Footer
   ========================================================================== */
.quiz-header {
    background-color: var(--color-neutral-white);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-secondary-green);
}
.quiz-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary-dark);
    text-decoration: none;
}
.header-nav {
    display: flex;
    gap: 24px;
}
.header-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
}
.quiz-footer-bar {
    background-color: var(--color-neutral-white);
    padding: 16px 0;
    border-top: 1px solid var(--color-secondary-green);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
}
.quiz-footer-bar p {
    margin: 0;
}

/* ==========================================================================
   3. Quiz Layout & Formular
   ========================================================================== */
.quiz-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.quiz-container {
    background-color: var(--color-neutral-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 700px;
    width: 100%;
}

.quiz-title {
    font-family: var(--font-headings);
    font-size: 32px;
    text-align: center;
    margin: 0 0 8px 0;
}
.quiz-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin: 0 0 40px 0;
}

#quiz-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font-headings);
    margin: 0 0 16px 0;
}

.answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.answer-label {
    display: block;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.answer-label:hover {
    border-color: var(--color-primary-dark);
    background-color: var(--color-background-green);
}

.answer-label input[type="radio"] {
    /* Versteckt den originalen Radio-Button */
    display: none;
}
.answer-label input[type="radio"]:checked + span {
    color: var(--color-primary-dark);
    font-weight: 500;
}

/* Visuelles Feedback für ausgewählte Antwort */
.answer-label:has(input[type="radio"]:checked) {
    border-color: var(--color-primary-dark);
    background-color: var(--color-background-green);
    box-shadow: 0 0 0 2px var(--color-primary-dark);
}

.quiz-footer {
    text-align: center;
    margin-top: 16px;
}

.button-primary {
    display: inline-block;
    padding: 16px 32px;
    background-color: var(--color-primary-dark);
    color: var(--color-neutral-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-headings);
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}
.button-primary:hover {
    background-color: #2a5a3f;
}

.quiz-message {
    margin-top: 16px;
    min-height: 24px;
    color: var(--color-primary-dark);
}


/* ==========================================================================
   4. Responsive Design
   ========================================================================== */
@media screen and (max-width: 767px) {
    .quiz-container {
        padding: 24px;
    }
    .quiz-title {
        font-size: 28px;
    }
}

/* ==========================================================================
   3. Quiz Layout & "Medical Dossier" Design
   ========================================================================== */
.quiz-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}
.quiz-container {
    background-color: var(--color-neutral-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 700px;
    width: 100%;
}
.quiz-title {
    font-family: var(--font-headings);
    font-size: 32px;
    text-align: center;
    margin: 0 0 8px 0;
}
.quiz-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin: 0 0 24px 0;
}

/* Fortschrittsleiste */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--color-background-green);
    border-radius: 4px;
    margin-bottom: 40px;
    overflow: hidden;
}
.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: var(--color-success);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Frage-Karten */
#quiz-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.quiz-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}
.quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
.quiz-card.is-answered {
    border-color: var(--color-success);
    background-color: #f6fff9;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%235a665e" viewBox="0 0 16 16"><path d="M4.5 2A1.5 1.5 0 0 0 3 3.5v9A1.5 1.5 0 0 0 4.5 14h7a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 11.5 2zM4 3.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5z"/><path d="M5.5 4a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0v-1a.5.5 0 0 1 .5-.5m3 0a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0v-1a.5.5 0 0 1 .5-.5"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.4s ease;
}
.quiz-card.is-answered .card-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%2300B67A" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg>');
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font-headings);
    margin: 0;
}
.answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.answer-label {
    display: block;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.answer-label:hover {
    border-color: var(--color-primary-dark);
}
.answer-label input[type="radio"] { display: none; }
.answer-label input[type="radio"]:checked + span { color: var(--color-primary-dark); font-weight: 500; }
.answer-label:has(input[type="radio"]:checked) {
    border-color: var(--color-success);
    background-color: #f6fff9;
}

/* Psychologisches Nudging */
.answer-label.is-bot-option span {
    color: var(--color-text-secondary);
    font-size: 0.95em;
}
.answer-label.is-bot-option:hover {
    border-color: var(--color-border); /* Kein Hover-Effekt */
}
.answer-label.is-bot-option:has(input[type="radio"]:checked) {
    border-color: var(--color-border); /* Kein Hervorheben bei Auswahl */
    background-color: #fafafa;
}

/* Footer & Button */
.quiz-footer { text-align: center; margin-top: 16px; }
.button-primary { /* ... bleibt gleich ... */ }
.quiz-message { /* ... bleibt gleich ... */ }

/* Responsive */
@media screen and (max-width: 767px) {
    .quiz-container { padding: 24px; }
    .quiz-card { padding: 16px; }
}

/* Overlay, zentriert */
.doctor-hint-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35); /* halbtransparent dunkel */
  z-index: 9999;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: auto;
  animation: fade-in .3s ease forwards;
}

.doctor-hint-overlay.out{
  animation: fade-out .25s ease forwards;
}

@keyframes fade-in{ from{opacity:0} to{opacity:1} }
@keyframes fade-out{ from{opacity:1} to{opacity:0} }

/* Karte */
.doctor-hint__card{
  width: min(92vw, 480px);
  background: var(--hint-bg);
  border: 1px solid var(--hint-border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
  padding: 20px;
  position: relative;
  transform: translateY(16px) scale(.96);
  opacity: 0;
  animation: card-in .35s cubic-bezier(.2,.8,.2,1) forwards;
}

.doctor-hint-overlay.out .doctor-hint__card{
  animation: card-out .25s ease forwards;
}

@keyframes card-in{
  from{opacity:0; transform:translateY(24px) scale(.96);}
  to{opacity:1; transform:translateY(0) scale(1);}
}
@keyframes card-out{
  from{opacity:1; transform:translateY(0) scale(1);}
  to{opacity:0; transform:translateY(8px) scale(.95);}
}

/* Close Button */
.doctor-hint__close{
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  border: 1px solid var(--hint-border);
  border-radius: 50%;
  background: #fff;
  color: var(--hint-secondary);
  cursor: pointer;
  font-size: 18px;
}
.doctor-hint__close:hover{ background:#f8faf9; }

/* Header */
.doctor-hint__header{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.doctor-hint__avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--hint-sage);}
.doctor-hint__title{display:grid;}
.doctor-hint__title strong{font-size:15px;}
.doctor-hint__subtitle{font-size:12px;color:var(--hint-secondary);}

/* Content */
.doctor-hint__quote{
  margin:6px 0 10px;
  padding-left:10px;
  border-left:3px solid var(--hint-sage);
  font-style:italic;
  font-size:15px;
  line-height:1.5;
}
.doctor-hint__text{
  color:var(--hint-secondary);
  font-size:14px;
  margin-bottom:14px;
}

/* CTA */
.doctor-hint__cta{
  background:var(--hint-accent);
  color:#fff;
  border:none;
  border-radius:8px;
  padding:10px 18px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.doctor-hint__cta:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(19,63,38,.18);
}