input,
textarea { border: 1px solid #ccc; }

.hidden { display: none !important; }

#comments-header {
  font-size: 1.2em;
  font-weight: bold; }

#comments-all { text-decoration: none; }

#comments-list,
#comments-form { padding: 0 4px; }

/* Форма отправки */

#comments-form { margin-top: 30px; }

#comments-form-top {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap; }

.comments-form-input-container { flex: 1 1 auto; }
.comments-form-input-container:last-child { margin-left: 16px; }

#comments-form-name,
#comments-form-email,
#comments-form-textarea {
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
  box-sizing: border-box;         /* Opera/IE 8+ */
  width  : 100%;
  font   : inherit;
  padding: 4px; }

#comments-form-body { display: flex; }

#comments-captcha {
  order : 0;
  flex  : 0 0 120px;
  height: 130px;
  margin: 10px 0;
  padding-top: 6px;
  font-size  : 0.9em;
  line-height: 1em;
  border: 1px solid #ccc;
  text-align: center; }

#comments-captcha-img {
  position: relative;
  width : 120px;
  height: 80px;
  background-image   : url('../captcha.php');
  background-repeat  : no-repeat;
  background-position: center;
  cursor: pointer; }

#comments-captcha-img:hover::after {
  content: 'Обновить';
  display: block;
  line-height: 75px;
  text-align : center;
  font-size  : 16px;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff; }

#comments-captcha-response {
  width: 80px;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  -moz-appearance: textfield; }

#comments-captcha-response::-webkit-inner-spin-button,
#comments-captcha-response::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0; }

#comments-form-main {
  order: 1;
  flex: 1 1 160px;
  margin-left: 12px;
  width: calc(100% - 134px); }

#comments-form-textarea {
  min-width : 100%;
  max-width : 100%;
  min-height: 70px;
  max-height: 250px;
  height: 96px;
  margin-top: 10px;
  padding: 2px 5px;
  font-size: 0.9em; }

.comments-btn {
  display: inline-block;
  position: relative;
  width: 250px;
  height: 2.25em;
  line-height: 2.4em;
  overflow: hidden;
  padding: 0 2em;
  margin-top: 4px;
  vertical-align: middle;
  background-color: #26a69a;
  color: #fff;
  border: none;
  border-radius: 2px;
  outline: 0;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.2s ease-in-out;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.47); }

.comments-btn:hover { background-color: #2ec5b7; }

.comments-btn:active { box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.47); }

#comments-form-bottom { position: relative; }

  #comments-form-extra {
    font-size: 0.8em;
    float: right;
    color: #ccc; }

/* Комментарии */

#comments-list {
  position: relative;
  /* min-height: 100px; */
  max-height: 400px;
  margin-top: 8px;
  overflow-y: scroll; }

#comments-list::-webkit-scrollbar { width: 6px; }

#comments-list::-webkit-scrollbar-track,
#comments-list::-webkit-scrollbar { background-color: #f5f5f5; }

#comments-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border: 1px solid transparent; }

#comments-list:hover::-webkit-scrollbar-track { box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); }

#comments-list:hover::-webkit-scrollbar-thumb {
  background-color: #777;
  border: 1px solid #444; }

#comments-empty {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 24px;
  color: #aaa;
  font-style: italic; }

.comments-hidden { visibility: hidden; }

.comment {
  position: relative;
  padding: 8px 10px;
  margin-bottom: 20px;
  border-radius: 3px;
  background-color: #f6f6f6; }

.comment::after {
  content: '';
  display: block;
  clear: both; }

.comment:last-child { margin-bottom: 0; }

.comment.admin { background-color: #e9e9f6; }

.comment-avatar {
  float: left;
  width: 48px;
  margin: 2px 4px;
  margin-right: 12px;
  border: 1px solid #cfcfcf;
  pointer-events: none; }

/* .comment-header { font-size: 1em; } */

.comment-author,
.comment-body {
  font-size: 0.9em;
  text-align: justify;
  line-height: 1.4em; }

.comment-author { font-weight: bold; }

  .comment-author::after {
    content: ':';
    display: inline; }

.comment-time {
  position: absolute;
  top: 2px;
  right: 6px;
  font-size: 0.7em;
  font-weight: normal;
  font-style: italic;
  color: #afafaf; }

.comment-body { margin-top: 0.2em; }


#comments-actions { display: none; margin: 0.5rem 0 0; text-align: center; }
#comments-actions > * { display: inline-block; margin: 0 1rem; }
#comments-actions a { text-decoration: none; line-height: 1; border-bottom: 1px dashed; }
/* #comments-actions .more-hide::after { content: 'Свернуть'; display: inline; }
#comments-list.has-more { overflow: hidden; transition: max-height, 0.5s ease; } */
#comments-list.has-more ~ #comments-actions { display: block; }
/* #comments-list.has-more.show-less .comment:nth-child(n+11) { display: none; }
#comments-list.has-more.show-less ~ #comments-actions .more-hide::after { content: 'Развернуть'; } */


/*    DINT    */
/* stylelint-disable no-duplicate-selectors, no-descending-specificity, block-opening-brace-space-before */

#comments {
  padding: 50px 0;
  text-align: left; }

.comments-btn { background-color: #64bed8; }

.comments-btn:hover { background-color: #6cddf5; }

#comments-form-name::-webkit-input-placeholder      { color: #888; }
#comments-form-name::-moz-placeholder               { color: #888; }
#comments-form-name:-ms-input-placeholder           { color: #888; }
#comments-form-name::placeholder                    { color: #888; }
#comments-form-email::-webkit-input-placeholder     { color: #888; }
#comments-form-email::-moz-placeholder              { color: #888; }
#comments-form-email:-ms-input-placeholder          { color: #888; }
#comments-form-email::placeholder                   { color: #888; }
#comments-form-textarea::-webkit-input-placeholder  { color: #888; }
#comments-form-textarea::-moz-placeholder           { color: #888; }
#comments-form-textarea:-ms-input-placeholder       { color: #888; }
#comments-form-textarea::placeholder                { color: #888; }
#comments-form-name:focus::-webkit-input-placeholder      { color: transparent; }
#comments-form-name:focus::-moz-placeholder               { color: transparent; }
#comments-form-name:focus:-ms-input-placeholder           { color: transparent; }
#comments-form-name:focus::placeholder                    { color: transparent; }
#comments-form-email:focus::-webkit-input-placeholder     { color: transparent; }
#comments-form-email:focus::-moz-placeholder              { color: transparent; }
#comments-form-email:focus:-ms-input-placeholder          { color: transparent; }
#comments-form-email:focus::placeholder                   { color: transparent; }
#comments-form-textarea:focus::-webkit-input-placeholder  { color: transparent; }
#comments-form-textarea:focus::-moz-placeholder           { color: transparent; }
#comments-form-textarea:focus:-ms-input-placeholder       { color: transparent; }
#comments-form-textarea:focus::placeholder                { color: transparent; }

#comments-form-textarea { height: 99px; }

#comments-form-top .comments-form-input-container             { display: none; }
#comments-form-top .comments-form-input-container:first-child { display: block; }

#comments-list {
  max-height: none;
  overflow: visible; }

.comment {
  background-color: transparent;
  border-bottom: 1px solid #eee;
  padding: 12px 10px;
  margin: 0; }

  .comment.admin { background-color: transparent; }
  .comment.admin .comment-author { color: #d30000; }


@media only screen and (max-width: 419px) {
  #comments { margin-bottom: 3em; }

  .comment { padding-top: 18px; }

  #comments-form-body { display: block; }

  #comments-captcha { height: auto; }
    #comments-captcha > * { vertical-align: middle; }
    #comments-captcha-img { display: inline-block; }

  #comments-form-main { margin: 0; width: 100%; }
  #comments-form-textarea { margin-top: 0; }

  #comments-form-bottom { min-height: 6rem; }
    #comments-form-submit {
      position: absolute;
      top: 1.6em; left: 0;
      width: 100%; }
}
/* CUSTOM */

.container ~ #comments{
  width: 100%;
    max-width: 980px;
    padding: 0 20px;
    margin: 0 auto;
    padding-bottom: 40px;
}
