.comments-section {
    padding: 40px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    display: flex;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
    flex-direction: column;
}

.comment-children {
    margin-top: 20px;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
}

.comment-children .comment-item {
    background: #f0f0f0;
    margin-bottom: 15px;
    padding: 15px;
}

.comment-avatar {
    margin-right: 4px;
    flex-shrink: 0;
}

.comment-avatar img {
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.comment-content {
    flex: 1;
    width: 100%;
}

.comment-meta {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    font-weight: bold;
    color: #333;
}

.comment-date {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    cursor: help;
}

.comment-date:hover {
    color: #333;
    text-decoration: underline;
}

.comment-text {
    color: #444;
    line-height: 1.6;
    margin-bottom: 12px;
    text-align: left;
}

/* Стили для изображений в комментариях */
.comment-image {
    margin-top: 15px;
    max-width: 100%;
}

.comment-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-form-image {
    margin: 15px 0;
}

.comment-form-image label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form-image input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.comment-form-image input[type="file"]:hover {
    border-color: #999;
}

.comment-reply {
    margin-top: 10px;
}

.comment-reply a {
    color: var(--dark-btn-color, #2C2C2E);
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid var(--dark-btn-color, #2C2C2E);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.comment-reply a:hover {
    background: var(--dark-btn-color, #2C2C2E);
    color: white;
    text-decoration: none;
}

.comment-form {
    margin-bottom: 40px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
}

.comment-form-author input,
.comment-form-email input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.submit-button {
    background: var(--dark-btn-color, #2C2C2E);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.submit-button:hover {
    background: #0056b3;
}

.no-comments {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Стили для формы ответа */
#respond {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#respond h3 {
    margin-bottom: 20px;
}

#cancel-comment-reply-link {
    font-size: 0.8em;
    margin-left: 10px;
    color: #666;
}

/* Анимация при ответе на комментарий */
.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Стили для вложенных комментариев */
.comment-children .comment-item {
    margin-left: 0;
    margin-top: 15px;
}

.comment-children .comment-item:last-child {
    margin-bottom: 0;
}

/* Стили для аватара и контента */
.comment-item > .comment-avatar {
    margin-bottom: 15px;
}

.comment-item > .comment-content {
    margin-left: 0;
}

/* Стили для пагинации комментариев */
.load-more-comments {
    text-align: center;
    margin: 30px 0;
}

.load-more-button {
    background: var(--dark-btn-color, #2C2C2E);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.load-more-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.load-more-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-loading-spinner 1s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
} 