/* Shared by the task bank and embedded tasks in lessons/materials. */
.task-code-section {
  display: flex;
  align-items: center;
  gap: 6px !important;
}

.ege-task-text img {
  cursor: pointer;
  max-width: 640px;
  width: auto;
  height: auto;
  transition: transform 0.2s ease;
}

.ege-task-text img:hover {
  transform: scale(1.01);
}

@media (max-width: 768px) {
  .task-code-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0px !important;
  }

  .task-difficulty {
    margin-top: -5px;
    font-size: 18px !important;
  }

  .ege-task-text img {
    max-width: 100% !important;
    height: auto !important;
  }

  .ege-task-text table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

.ege-task-block {
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 2px 12px #0001;
  margin-bottom: 28px;
  padding: 22px 28px;
}

.ege-task-code {
  font-size: 20px !important;
  color: #707dff;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Manrope', sans-serif !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-code-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.task-actions {
  display: flex;
  gap: 10px;
}

.edit-task-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #707dff;
  border: 2px solid #707dff;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-task-btn:hover {
  background: #f6f7ff;
  transform: translateY(-1px);
}

.edit-task-btn svg {
  width: 14px;
  height: 14px;
}

.task-code-link {
  color: #707dff;
  text-decoration: none;
  transition: color 0.2s;
}

.task-code-link:hover {
  color: #5560c9;
  text-decoration: underline;
}

.task-difficulty {
  color: #707dff;
  font-weight: 600;
  font-size: 20px !important;
  font-family: 'Manrope', sans-serif !important;
}

.task-exam-badge {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: #f0f0f7;
  border-radius: 20px;
  padding: 3px 12px;
  display: inline-block;
  vertical-align: middle;
}

.ege-task-text,
.ege-task-text * {
  font-size: 18px !important;
  font-family: 'Manrope', sans-serif !important;
}

.ege-task-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  margin-top: 15px;
}

.ege-task-answer {
  font-size: 1.1rem;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #e0e6ed;
  width: 320px;
  transition: all 0.3s ease;
}

.ege-task-answer:disabled {
  border-color: #4ade80;
  background-color: #f0fdf4;
  color: #166534;
  cursor: not-allowed;
}

.ege-task-answer.incorrect {
  border-color: #ef4444;
  background-color: #fef2f2;
  color: #991b1b;
}

.ege-task-check-btn {
  background: #707dff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1.08rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ege-task-check-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #ccc;
  color: #666;
}

.ege-task-feedback {
  min-height: 24px;
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0;
  padding: 0;
}

.ege-task-solution {
  background: #f6f7ff;
  border-radius: 20px;
  margin-top: 14px;
  padding: 20px;
  border-left: 4px solid #707dff;
}

.ege-task-solution-title {
  font-size: 18px;
  font-weight: 600;
  color: #707dff;
  margin-bottom: 16px;
  margin-top: 0px;
  font-family: 'Manrope', sans-serif !important;
}

.ege-task-video {
  margin-bottom: 20px;
  max-width: 500px;
  position: relative;
}

.ege-task-video .plyr {
  width: 100%;
  max-width: 500px;
}

/* Стили для видео */
.ege-task-video video {
  cursor: pointer;
}

/* Кастомизация Plyr */
.ege-task-block .plyr {
  border-radius: 25px !important;
  overflow: hidden;
  height: auto !important;
}

.ege-task-block .plyr__video-wrapper {
  border-radius: 25px !important;
  height: auto !important;
}

.ege-task-block .plyr video {
  border-radius: 25px !important;
}

/* Акцентный цвет для элементов управления */
.ege-task-block .plyr--video .plyr__control:focus-visible,
.ege-task-block .plyr--video .plyr__control:hover,
.ege-task-block .plyr--video .plyr__control[aria-expanded=true] {
  background: #707dff !important;
  color: #fff !important;
}

.ege-task-block .plyr__control--overlaid {
  display: flex !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: rgba(112, 125, 255, 0.6) !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 72px !important;
  height: 72px !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
}

.ege-task-block .plyr__control--overlaid:focus,
.ege-task-block .plyr__control--overlaid:hover {
  background: rgba(85, 96, 201, 0.9) !important;
  transform: translate(-50%, -50%) scale(1.1) !important;
}

/* Цвет прогресс-бара */
.ege-task-block .plyr--full-ui input[type=range] {
  color: #707dff !important;
}

.ege-task-block .plyr__progress__buffer {
  color: #707dff !important;
}

/* Стили для кнопок управления */
.ege-task-block .plyr__control {
  transition: all 0.2s ease !important;
}

.ege-task-block .plyr__control:hover {
  background: #707dff !important;
  color: #fff !important;
}

.ege-task-solution-desc {
  color: #4a5568;
  line-height: 1.6;
  font-size: 18px;
  font-family: 'Manrope', sans-serif !important;
  margin-bottom: 12px;
}

.ege-task-solution-desc,
.ege-task-solution-desc * {
  font-family: 'Manrope', sans-serif !important;
  font-size: 18px !important;
}

.ege-task-solution-desc img {
  display: block;
  max-width: 640px;
  width: 100%;
  height: auto;
  margin: 16px 0;
}

.ege-task-solution-answer {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  font-family: 'Manrope', sans-serif !important;
}

.ege-task-show-solution-btn {
  background: #fff;
  color: #707dff;
  border: 1px solid #707dff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1.08rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  min-width: 120px;
}

.ege-task-show-solution-btn:hover {
  background: #f6f7ff;
}

/* Стили для дополнительных файлов задания */
.task-data-files {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 16px;
  border: 1px solid #e0e6ed;
}

.task-files-title {
  font-size: 16px;
  font-weight: 600;
  color: #707dff;
  margin-bottom: 12px;
  font-family: 'Manrope', sans-serif;
}

.task-files-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.task-file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.task-file-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.task-file-icon::before {
  content: '';
  width: 80px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}

/* Иконки для разных типов файлов при выводе задания */
.task-file-icon[data-filename*=".pdf"]::before {
  background-image: url('/static/svg/icons/document-file-pdf-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".doc"]::before,
.task-file-icon[data-filename*=".docx"]::before {
  background-image: url('/static/svg/icons/doc-document-docx-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".xls"]::before,
.task-file-icon[data-filename*=".xlsx"]::before {
  background-image: url('/static/svg/icons/excel-file-xlsx-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".jpg"]::before,
.task-file-icon[data-filename*=".jpeg"]::before,
.task-file-icon[data-filename*=".png"]::before,
.task-file-icon[data-filename*=".gif"]::before {
  background-image: url('/static/svg/icons/file-image-jpg-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".mp4"]::before,
.task-file-icon[data-filename*=".avi"]::before,
.task-file-icon[data-filename*=".mov"]::before {
  background-image: url('/static/svg/icons/file-mp4-video-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".zip"]::before,
.task-file-icon[data-filename*=".rar"]::before {
  background-image: url('/static/svg/icons/compressesd-file-rar-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".txt"]::before {
  background-image: url('/static/svg/icons/file-txt-word-svgrepo-com 1.svg');
}

.task-file-icon[data-filename*=".mp3"]::before {
  background-image: url('/static/svg/icons/audio-file-mp3-svgrepo-com 1.svg');
}

.task-file-icon[data-filename*=".html"]::before {
  background-image: url('/static/svg/icons/file-html-web-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".css"]::before {
  background-image: url('/static/svg/icons/css-file-web-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".psd"]::before {
  background-image: url('/static/svg/icons/file-photoshop-psd-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".ai"]::before {
  background-image: url('/static/svg/icons/file-illustrator-svgrepo-com.svg');
}

.task-file-icon[data-filename*=".ppt"]::before,
.task-file-icon[data-filename*=".pptx"]::before {
  background-image: url('/static/svg/icons/file-powerpoint-ppt-svgrepo-com.svg');
}

/* Fallback для неизвестных типов файлов */
.task-file-icon::before {
  background-image: url('/static/svg/icons/file-txt-word-svgrepo-com 1.svg');
}



.task-file-icon:hover {
  transform: scale(1.05);
}

.task-file-name {
  font-size: 12px;
  color: #555;
  word-break: break-word;
  line-height: 1.2;
  max-width: 80px;
  font-family: 'Manrope', sans-serif;
}

.task-file-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
}

.task-file-link:hover {
  transform: scale(1.02);
}

/* Стили для файла ответа */
.ege-task-answer-file {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ege-task-answer-file:focus {
  outline: none;
  border-color: #707dff;
  box-shadow: 0 0 0 3px rgba(112, 125, 255, 0.1);
}

.ege-task-answer-file:disabled {
  background-color: #f0fdf4;
  border-color: #4ade80;
  color: #166534;
  cursor: not-allowed;
}

.answer-file-link {
  color: #707dff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.answer-file-link:hover {
  color: #5560c9;
  text-decoration: underline;
}


.ege-task-block p {
  margin: 0;
}
