/* 7 клас*/

.multiple-choice .options label {
  display: block;
  margin: 5px 0;
}

.multiple-choice .options .katex-display {
  margin: 2px 0;
  /* Зменшений відступ для KaTeX у блоці з множинним вибором */
}

.question {
  margin-bottom: 20px;
  position: relative;
  text-align: left;
  padding-left: 20px;
}

.options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 20px;
  line-height: 2;
}

.hidden {
  display: none;
}

.error-message {
  color: red;
  font-weight: bold;
  margin-top: 5px;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border: 3px solid #7FFF00;
  /* Салатова рамка товщиною 3px */
  border-radius: 15px;
  /* Скруглені кути */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 1000;
  text-align: left;
}


.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.options label {
  font-size: 20px;
  /* Збільшений розмір тексту */
  padding-left: 10px;
}

/* Додаємо адаптивне розміщення зображень */
.image-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  flex-direction: row;
}

.image-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(25% - 10px);
  /* 4 в рядок */
  box-sizing: border-box;
  /* Враховує padding у ширині */
  cursor: pointer;
  border: 3px solid transparent;
  /* Початкова рамка невидима */
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

.image-options img {
  width: 100%;
  max-width: 150px;
  height: auto;
  display: block;
}

.image-options input[type="radio"] {
  display: none;
  /* Ховаємо стандартні радіокнопки */
}

.image-options input[type="radio"]:checked+img {
  border: 3px solid #00aaff;
  /* Синя рамка навколо вибраного зображення */
  border-radius: 10px;
}

/* wordpress problem*/

.answerinput {
  width: 250px;
  margin: 0 auto;
}

.rslt01 {
  width: 150px;
  height: 40px;
  font-size: 30px;
  margin-bottom: 30px;
  margin-right: 10px;
  padding-bottom: 4px;
}

.usertxt {
  width: 250px;
  text-align: center;
  font-size: 20px;
}

.sub-button {
  font-size: 20px;
  width: 130px;
  height: 40px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  color: #fff;
  border: 0 solid #999;
  border: none transparent;
  background: -webkit-linear-gradient(top, #4aca5f 0%, #0e9c3a 100%);
  text-decoration: none;
  border-radius: 5px;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-transition: .1s linear -webkit-box-shadow;
  -moz-transition: .1s linear -moz-box-shadow;
  -ms-transition: .1s linear box-shadow;
  -o-transition: .1s linear box-shadow;
  transition: .1s linear box-shadow;
}

#dobre,
#nedobre {
  display: none;
}

#dobre,
#nedobre {
  width: 150px;
  margin: 0 auto;
}

.visibleDobre {
  background: #fff;
  position: fixed;
  top: 50%;
  margin-top: -100px;
  overflow: hidden;
  z-index: 2000;
  width: 170px;
  padding: 20px;
  border-radius: 25px;
}

.winImgDobre {
  width: 100px;
  height: 100px;
  float: left;
}

.winImgOk {
  float: right;
  margin-top: 20px;
}

.overlay {
  background: #0000003b;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  opacity: .5;
}

.visible {
  background: #fff;
  position: fixed;
  top: 100px;
  overflow: hidden;
  z-index: 2000;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  border-radius: 25px;
}

.ptxt {
  font-size: 24px;
  font-family: "Times New Roman", Times, serif;
}


#win {
  display: none;
  width: 380px;
  margin: 0 auto;
}

#win button {
  float: right;
  line-height: 20px;
  margin: 1.2em;
  color: #040404;
}

#win button[type="button"]:hover {
  cursor: pointer;
}

#win span {
  text-align: center;
  color: #555;
  font-size: 22px;
  font-weight: bold;
}

.content {
  padding: 0 1em;
}

#winImg {
  width: 100px;
  float: left;
}

#winTxt {
  width: 90%;
  float: left;
  font-size: 20px;
  margin-top: 10px;
  margin-left: 20px;
}

.child-box-answer {
  background-color: rgb(237 237 236 / 56%);
  padding-top: 20px;
  text-align: center;
  flex: 1 1 50%;
}

.box-answer {
  width: 100%;
  max-width: 350px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
}

/*Новий тип запитань*/
.matching-table {
  max-width: 200px;
  margin: 20px auto;
  border-collapse: collapse;
  /* Щільно прилягають межі */
}

.matching-table th,
.matching-table td {
  border: 2px solid black;
  /* Чіткі межі для клітинок */
  text-align: center;
  padding: 5px;
}

.matching-table th {
  background-color: #f0f0f0;
  /* Легка заливка заголовків */
}

.matching-table td input[type="radio"] {
  transform: scale(1.2);
  /* Збільшує радіокнопки */
  margin: 3px;
}

@media (max-width: 768px) {

  /* 2 на 2 */
  .image-options label {
    width: calc(50% - 10px);
    /* 2 на 2 */
  }

  .image-options {
    padding-left: 0px;
  }

  .aligncenter {
    padding: 0px;
  }
}

@media (max-width: 600px) {
  .popup {
    width: 90%;
    /* Для телефонів робимо ширину майже на весь екран */
  }

  .options {
    line-height: 3;
  }
}

@media (max-width: 480px) {
  .image-options label {
    width: calc(50% - 10px);
    /* 2 на 2 */
  }

  .image-options {
    padding-left: 0px;
  }

  .aligncenter {
    padding: 0px;
  }
}