/* ===== COMMENT FORM ===== */

.comment-form-section {
  padding: 30px 0 10px;
  background: #fff;
}

.comment-form-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.comment-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #414141;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(114, 168, 211, 0.4);
  font-family: Arial, sans-serif;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Верхняя строка: аватар + имя + почта */
.comment-form__top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Аватар */
.comment-form__avatar-label {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e89f89;
  cursor: pointer;
  background: #f0f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.comment-form__avatar-label:hover {
  border-color: #5f95ad;
}

.comment-form__avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 50%;
}

.comment-form__avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}

.comment-form__avatar-placeholder svg {
  width: 24px;
  height: 24px;
  fill: #9faeb5;
}

.comment-form__avatar-placeholder span {
  font-size: 9px;
  color: #9faeb5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  font-family: Arial, sans-serif;
}

.comment-form__avatar-input {
  display: none;
}

/* Поля имя + почта */
.comment-form__fields {
  display: flex;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.comment-form__input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid #c8d8e0;
  border-radius: 5px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  color: #414141;
  background: #f9fbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  height: 42px;
}

.comment-form__input:focus {
  border-color: #5f95ad;
  box-shadow: 0 0 0 3px rgba(95, 149, 173, 0.15);
  background: #fff;
}

.comment-form__input::placeholder {
  color: #b0bec5;
}

/* Поле комментария */
.comment-form__textarea {
  width: 100%;
  min-height: 110px;
  padding: 11px 13px;
  border: 1px solid #c8d8e0;
  border-radius: 5px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  color: #414141;
  background: #f9fbfc;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
  line-height: 1.5;
}

.comment-form__textarea:focus {
  border-color: #5f95ad;
  box-shadow: 0 0 0 3px rgba(95, 149, 173, 0.15);
  background: #fff;
}

.comment-form__textarea::placeholder {
  color: #b0bec5;
}

/* Загрузка фото к комментарию */
.comment-form__photo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #5f95ad;
  font-family: Arial, sans-serif;
  padding: 7px 14px;
  border: 1px dashed #9fcfe0;
  border-radius: 5px;
  background: #f0f7fb;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
  width: fit-content;
}

.comment-form__photo-label:hover {
  background: #dff0f8;
  border-color: #5f95ad;
}

.comment-form__photo-label svg {
  width: 18px;
  height: 18px;
  fill: #5f95ad;
  flex-shrink: 0;
}

.comment-form__photo-input {
  display: none;
}

.comment-form__photo-name {
  font-size: 13px;
  color: #9faeb5;
  margin-left: 4px;
  font-style: italic;
}

/* Превью прикреплённого фото */
.comment-form__photo-preview {
  display: none;
  position: relative;
  width: fit-content;
  margin-top: 4px;
}

.comment-form__photo-preview img {
  max-width: 180px;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid #c8d8e0;
  object-fit: cover;
  display: block;
}

.comment-form__photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #e05555;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.comment-form__photo-remove svg {
  width: 10px;
  height: 10px;
  fill: #fff;
}

/* Кнопка отправки */
.comment-form__submit {
  align-self: flex-start;
  padding: 12px 30px;
  background: #ff3c01;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: Arial, sans-serif;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}

.comment-form__submit:hover {
  background: #e03000;
}

.comment-form__submit:active {
  transform: scale(0.98);
}

/* Сообщение после отправки */
.comment-form__success {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(114, 168, 211, 0.2);
  border: 1px solid rgba(95, 149, 173, 0.35);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 15px;
  color: #414141;
  font-family: Arial, sans-serif;
  line-height: 1.4;
}

.comment-form__success svg {
  width: 28px;
  min-width: 28px;
  height: 28px;
  fill: #5f95ad;
}

/* Мобайл */
@media (max-width: 576px) {
  .comment-form__fields {
    flex-direction: column;
  }
  .comment-form__top {
    align-items: flex-start;
  }
  .comment-form__submit {
    width: 100%;
    text-align: center;
  }
}
