/* ========================================
   MODALS COMPONENT - Глобальные модальные окна
   Используется для: жалоб, подтверждений, редактирования
   ======================================== */

/* Затемнение */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

/* Общий контейнер для всех модалок */
.modal-container {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Специфичные классы для разных модалок (для совместимости) */
.modal-report,
.modal-edit,
.modal-applications {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

.modal-report__content,
.modal-edit__content,
.modal-applications__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Заголовок модалки */
.modal-report__header,
.modal-edit__header,
.modal-applications__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-report__header h3,
.modal-edit__header h3,
.modal-applications__header h3 {
  color: var(--color-text-white);
  font-size: 1.3rem;
  margin: 0;
  font-weight: 600;
}

/* Кнопка закрытия */
.modal-report__close,
.modal-edit__close,
.modal-applications__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-report__close:hover,
.modal-edit__close:hover,
.modal-applications__close:hover {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  transform: rotate(90deg);
}

/* Тело модалки */
.modal-report__body,
.modal-edit__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Описание (автор гайда/комментария) */
.modal-report__descr {
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  padding: 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  border-left: 3px solid var(--color-primary-start);
}

.modal-report__descr strong {
  color: var(--color-primary-start);
}

/* Форма внутри модалки */
.modal-report .form__group,
.modal-edit .form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.modal-report .form__label,
.modal-edit .form__label {
  color: var(--color-text-white);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-report .form__label i,
.modal-edit .form__label i {
  color: var(--color-primary-start);
  width: 20px;
}

.modal-report .form__select,
.modal-report .form__textarea,
.modal-edit .form__select,
.modal-edit .form__textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  color: var(--color-text-white);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-report .form__select:focus,
.modal-report .form__textarea:focus,
.modal-edit .form__select:focus,
.modal-edit .form__textarea:focus {
  outline: none;
  border-color: var(--color-primary-start);
  background: rgba(255, 255, 255, 0.1);
}

.modal-report .form__textarea,
.modal-edit .form__textarea {
  min-height: 100px;
  resize: none;
}

/* Подсказка */
.modal-report .form__hint,
.modal-edit .form__hint {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Действия модалки */
.modal-report__actions,
.modal-edit__actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
  margin-top: 10px;
}

.modal-report__actions .btn,
.modal-edit__actions .btn {
  min-width: 120px;
  padding: 10px 20px;
}

/* Стили скролла для модалок */
.modal-report__content::-webkit-scrollbar,
.modal-edit__content::-webkit-scrollbar,
.modal-applications__content::-webkit-scrollbar {
  width: 6px;
}

.modal-report__content::-webkit-scrollbar-track,
.modal-edit__content::-webkit-scrollbar-track,
.modal-applications__content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-report__content::-webkit-scrollbar-thumb,
.modal-edit__content::-webkit-scrollbar-thumb,
.modal-applications__content::-webkit-scrollbar-thumb {
  background: var(--color-primary-start);
  border-radius: 3px;
}

/* Кнопка жалобы (общий стиль) */
.report-btn {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
  transition: all 0.2s ease;
}

.report-btn:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: #ff4757;
  transform: translateY(-2px);
}

.report-btn.reported,
.comment__report.reported {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.3);
  color: #888;
}

/* Анимации */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность */
@media (max-width: 576px) {

  .modal-report__content,
  .modal-edit__content,
  .modal-applications__content {
    padding: 20px;
    max-width: calc(100% - 20px);
  }

  .modal-report__actions,
  .modal-edit__actions {
    flex-direction: column;
  }

  .modal-report__actions .btn,
  .modal-edit__actions .btn {
    width: 100%;
  }

  .modal-report__header h3,
  .modal-edit__header h3,
  .modal-applications__header h3 {
    font-size: 1.2rem;
  }

  .modal-report__descr {
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {

  .modal-report__content,
  .modal-edit__content,
  .modal-applications__content {
    padding: 15px;
  }

  .modal-report .form__select,
  .modal-report .form__textarea,
  .modal-edit .form__select,
  .modal-edit .form__textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}