/* ============================================================
   КОММЕНТАРИИ
   Подключается только на страницах с открытыми комментариями
   (is_singular() && comments_open())
   ============================================================ */

/* ------------------------------------------------------------
   КОНТЕЙНЕР КОММЕНТАРИЕВ
   ------------------------------------------------------------ */
.alt-comments-area {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 40px 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ------------------------------------------------------------
   ЗАГОЛОВКИ
   ------------------------------------------------------------ */
.alt-comments-title,
.alt-comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* ------------------------------------------------------------
   СПИСОК КОММЕНТАРИЕВ
   ------------------------------------------------------------ */
.alt-comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.alt-comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid #f0f2f5;
    list-style: none;
}

.alt-comment-list .comment:last-child {
    border-bottom: none;
}

/* Вложенные комментарии (ответы) */
.alt-comment-list .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 20px;
    border-left: 3px solid #e9ecef;
}

/* ------------------------------------------------------------
   АВТОР, АВАТАР, МЕТА
   ------------------------------------------------------------ */
.alt-comment-list .comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.alt-comment-list .comment-author img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.alt-comment-list .comment-author .fn {
    font-weight: 600;
    color: #2d3436;
    font-style: normal;
    font-size: 15px;
}

.alt-comment-list .comment-metadata {
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 12px;
    padding-left: 60px;
}

.alt-comment-list .comment-metadata a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.2s;
}

.alt-comment-list .comment-metadata a:hover {
    color: var(--primary-color, #6c5ce7);
}

/* ------------------------------------------------------------
   КОНТЕНТ КОММЕНТАРИЯ
   ------------------------------------------------------------ */
.alt-comment-list .comment-content {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    padding-left: 60px;
}

.alt-comment-list .comment-content p {
    margin-bottom: 12px;
}

.alt-comment-list .comment-content p:last-child {
    margin-bottom: 0;
}

/* Кнопка «Ответить» */
.alt-comment-list .reply {
    padding-left: 60px;
    margin-top: 10px;
}

.alt-comment-list .reply a {
    display: inline-block;
    font-size: 13px;
    color: var(--primary-color, #6c5ce7);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.alt-comment-list .reply a:hover {
    opacity: 0.8;
}

/* Модерация */
.alt-comment-list .comment-awaiting-moderation {
    display: inline-block;
    background: #fff8e6;
    color: #856404;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 8px;
    margin-left: 60px;
}

/* ------------------------------------------------------------
   ФОРМА КОММЕНТАРИЯ
   ------------------------------------------------------------ */
.alt-comment-respond {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.alt-comment-reply-title {
    margin-bottom: 20px;
}

.alt-comment-reply-title small {
    font-size: 14px;
    font-weight: 400;
    margin-left: 15px;
}

.alt-comment-reply-title small a {
    color: #95a5a6;
    text-decoration: none;
}

/* Поля формы */
.alt-comment-form p {
    margin-bottom: 20px;
}

.alt-comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
}

.alt-comment-form input[type="text"],
.alt-comment-form input[type="email"],
.alt-comment-form input[type="url"],
.alt-comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #2d3436;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.alt-comment-form input[type="text"]:focus,
.alt-comment-form input[type="email"]:focus,
.alt-comment-form input[type="url"]:focus,
.alt-comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color, #6c5ce7);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.alt-comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

/* Кнопка отправки */
.alt-comment-submit {
    display: inline-block;
    width: auto;
    background: var(--button-gradient, linear-gradient(135deg, #6c5ce7, #a29bfe));
    color: #fff;
    padding: 14px 40px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.alt-comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.45);
}

/* ------------------------------------------------------------
   ЧЕКБОКС СОГЛАСИЯ С ПОЛИТИКОЙ КОНФИДЕНЦИАЛЬНОСТИ
   ------------------------------------------------------------ */
.alt-comment-form-privacy {
    margin-bottom: 20px;
}

.alt-privacy-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 400 !important;
    color: #636e72;
    cursor: pointer;
    line-height: 1.5;
    margin: 0 !important;
}

.alt-privacy-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color, #6c5ce7);
}

.alt-privacy-label span {
    flex: 1;
}

.alt-privacy-label a {
    color: var(--primary-color, #6c5ce7);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.alt-privacy-label a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* ------------------------------------------------------------
   ПАГИНАЦИЯ КОММЕНТАРИЕВ
   ------------------------------------------------------------ */
.alt-comments-area .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #fff;
    border-radius: 8px;
    color: #2d3436;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.alt-comments-area .page-numbers.current,
.alt-comments-area .page-numbers:hover {
    background: var(--button-gradient, linear-gradient(135deg, #6c5ce7, #a29bfe));
    color: #fff;
}



/* ------------------------------------------------------------
   АДАПТИВНОСТЬ
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .alt-comments-area {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .alt-comments-title,
    .alt-comment-reply-title {
        font-size: 19px;
    }

    .alt-comment-list .children {
        padding-left: 15px;
    }

    .alt-comment-list .comment-metadata,
    .alt-comment-list .comment-content,
    .alt-comment-list .reply,
    .alt-comment-list .comment-awaiting-moderation {
        padding-left: 0;
        margin-left: 0;
    }

    .alt-comment-list .comment-author img {
        width: 40px;
        height: 40px;
    }

    .alt-comment-form input[type="submit"],
    .alt-comment-submit {
        width: 100%;
        padding: 12px 20px;
    }
}