/* Gesamt-Container */
.test_container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  background-color: var(--background-1);
  color: var(--text-3);
  position: relative;
  border-style: inset;
  border-width: 1px;
  border-radius:3px;
}

/* Header mit Back-Button, Titel und Fortschritt */
.test_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.test_back {
  background: var(--testbutton-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  width:3.5rem;
  height:3.5rem;
  transition:0.25s;
}

.test_back:hover {
    background-color: var(--glass-hover);
    transition:0.25s;
}

.test_title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.5rem;
}
.test_progress {
  font-size: 1rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  min-width: 3rem;
  text-align: right;
}

/* Übersicht der Test-Durchläufe */
.test_list {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.test_list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
}

.test_answer_button math-field {
  pointer-events: none;
}

/* Einheitliche Buttons */
.test_button,
.test_answer_button {
  -webkit-tap-highlight-color: transparent;
  display: block;
  padding: 0.75rem 1rem;
  background: var(--testbutton-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-3);
  font-size: 1.5rem;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s;
  user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  touch-action: manipulation; /* verhindert Doppeltap-Vergrößerung */
  -webkit-touch-callout: none; /* verhindert iOS-Auswahlmenü */
}
.test_button:hover {
  background: var(--glass-hover);
}
.test_button {
  width: calc(100% - 2rem);
  margin: 0.5rem auto;
  max-width: 500px;
}

.test_answer_button p{
    margin:0;
    user-select: none;
}

/* Fragen-Text */
.test_question_text {
  padding: 1rem;
  background: var(--background-1);
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Navigations-Buttons (←/→) */
.test_nav {
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  user-select: none;
}
.test_nav .test_button {
  width: 4rem;
  padding: 0.5rem;
  margin: 1rem 0;
  user-select: none;
}
.test_date{
    margin: 0 1rem;
    
}
.test_prog{
    margin: 0 1rem;
    font-weight: bold;
}

/* Antworten-Container */
.test_answers {
  display: flex;
  /*flex-direction: row;*/
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 0;
  position: relative;
}

/* Antwort-Buttons */
.test_answer_button {
  flex: 1 1 calc(50% - 1rem);
  margin: 0.5rem;
  user-select: none;
  /*max-width: 40rem;*/
}
.test_answer_button:active {
  transform: scale(0.98);
}

/* Form der Buttons */
.test_single {
  border-radius: 16px;
}
.test_multi {
  border-radius: 4px;
}

/* Status-Markierungen */
.test_selected {
  background: rgba(255, 255, 0, 0.3) !important;
}
.test_correct {
  background: rgba(0, 200, 0, 0.3) !important;
}
.test_wrong {
  background: rgba(200, 0, 0, 0.3) !important;
}
.test_missing {
  background: rgba(0, 200, 0, 0.15) !important;
}

/* Action-Bereich (Auflösung / Weiter) */
.test_action {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}
.test_action .test_button {
  width: calc(100% - 2rem);
  margin: 1rem auto;
  user-select: none;
}

/* Fullscreen-Button */
#test_fullscreen_btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--testbutton-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-size: 1.5rem;
  line-height: 2.5rem;
  cursor: pointer;
  user-select: none;
  transition: 0.25s;
}
#test_fullscreen_btn:hover{
    background-color: var(--glass-hover);
    transition:0.25s;
}

/* Modal-Overlay für Musterlösung innerhalb des Antwort-Bereichs */
.test_modal_overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  z-index: 10;
}
.test_modal_overlay.hidden {
  display: none;
}
.test_modal {
  background: var(--testmodal-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  max-width: 90%;
  max-height: 80%;
  overflow: auto;
  color: var(--text-3);
  font-size: 1.5rem;
}

/* Fragen blur, wenn Modal geöffnet */
.test_container.modal-open .test_question_text {
  filter: blur(4px);
}
.test_nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.test_nav_details {
  flex: 1;           /* Zwischen die Buttons stretchen */
  text-align: center;
  font-weight: bold;
  color: var(--text-3);
}

.question_displayname { margin-bottom: 0.5em; font-size: 1.1em; }
.question_points     { margin-bottom: 1em; color: #ccc; }
.question_wrapper    { padding: 1em; border: 1px solid #888; margin-bottom:1em; }

.question_parent_context{
    display: block;
    background: var(--accent-3);
    border-radius: 8px;
    color: var(--text-3);
    padding: 0.75rem 1rem;
    max-height: 5.5rem;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0.5 rem;
    font-style: italic;
    font-size: 1.5rem;
}

.question_parent_context:hover {
  background: var(--shimmer);
}



div#test_content {
    height: calc(100vh - 6rem);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

div#test_content::-webkit-scrollbar {
    display: none;   
}