/* Комментарии и структура */
.comment-list {
  list-style: none;
  padding-left: 0;
}
.comment-list .comment-list {
  padding-left: 20px;
}
.comment-item {
  padding-left: 10px;
  margin-bottom: 15px;
}
.comment-list > .comment-item {
  padding-left: 0;
}
.article-content {
  margin-bottom: 30px;
}

/* Автор комментария */
.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475876;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 16px;
}
.comment-author .time {
  font-size: 12px;
  color: #aaa;
}

/* Аватар */
.avatar img,
.avatar span {
  border-radius: 50%;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border: 2px solid #7f9cc5;
  padding: 2px;
}
.avatar span {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  text-transform: uppercase;
  color: #fff;
  background: #475876;
}

/* Текст комментария */
.comment-text {
  margin-left: 30px;
  font-size: 16px;
}
.comment-text b {
  font-size: 14px;
}

/* Голосование и кнопки */
.comment-votes {
  margin-bottom: 14px;
  margin-left: 20px;
  font-size: 16px;
}
.comment-votes > button,
.reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  margin-right: 10px;
  padding: 0;
}
.comment-votes > button:hover,
.reply-btn:hover {
  color: #007bff;
  text-decoration: underline;
}
.voted {
  font-weight: bold;
  color: #007bff;
}

/* Форма комментария */
.reply-form,
.reply-form-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  justify-content: center;
}
.reply-form {
  margin-top: 10px;
}
.reply-form input,
.reply-form textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 4px 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.reply-form button {
  color: #fff;
  border: none;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
}
#commentForm {
  margin-top: 30px;
}
#commentForm input,
#commentForm textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Эмодзи и счетчик */
.textarea-with-emoji {
  position: relative;
  display: flex;
}
.reply-form textarea {
  padding-right: 36px;
  min-height: 4em;
  resize: none;
  background-image: none;
}
.emoji-dropdown-wrapper {
  position: relative;
  margin-left: 5px;
}
.form__wrap .emoji-toggle-btn {
  font-size: 20px;
  padding: 5px 10px;
  cursor: pointer;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #efefef;
}
@media (max-width: 680px) {
  .form__wrap .emoji-toggle-btn {
    padding: 0;
  }
}
.emoji-popup {
  position: absolute;
  top: 100%;
  right: 0;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 5px;
  max-width: 300px;
  max-height: 170px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  margin-top: 5px;
  z-index: 10;
}
.emoji-popup[hidden] {
  display: none;
}
.emoji-popup .emoji-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.reply-form .counter {
  top: auto;
  bottom: -18px;
  right: 0;
}

/* Уведомления */
.reply-form .notify {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.reply-form .notify label,
.notify svg {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-right: 10px;
  border: 1px solid #ccc;
}

.reply-form .notify label {
  display: none; /* пока так */
}

.notify input.notify-checkbox {
  display: none;
  width: 0;
  height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}
.notify svg {
  width: 30px;
  height: 30px;
  fill: #475876;
  stroke: #475876;
}
.notify .icon use {
  display: none;
}
.notify-checkbox:not(:checked) ~ .icon .icon-off {
  display: block;
}
.notify-checkbox:checked ~ .icon .icon-on {
  display: block;
}
.notify button {
  white-space: nowrap;
  user-select: none;
}

.comment-form-status {
  width: 100%;
  margin-top: 8px;
  font-size: 14px;
  min-height: 20px;
}

.comment-form-status.info {
  color: #475876;
}

.comment-form-status.error {
  color: #b42318;
}

/* Адаптивность */
@media (min-width: 928px) {
  label[for="email"] {
    display: none;
  }
}
@media (max-width: 680px) {
  .reply-form-wrap {
    flex-wrap: wrap;
  }
  .reply-form .notify {
    margin-left: auto;
  }
}
.blog-title {
  position: relative;
  margin-bottom: 30px;
}

.blog-title:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.53);
  user-select: none;
  pointer-events: none;
  -webkit-user-select: none;
}

.blog-title img + h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: #ffffff;
  width: calc(100% - 30px);
  display: flex;
  justify-content: center;
}

.blog-img {
  width: 100%;
  max-height: 360px;
  min-height: 220px;
  max-height: 390px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 20px;
}

.news__date {
  color: #fff;
  /* margin-bottom: 30px; */
  padding: 0px 6px;
  font-size: 16px;
  font-weight: 400;
  background: #475876;
  position: relative;
  z-index: 1;
}

.blog-title img + h1 + .news__date {
  position: absolute;
  left: 0;
  bottom: 0;
}
