/* ========================================
   COMMENTS STYLES
   ======================================== */

/* Comments Section */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.comments-title {
    font-size: 1.75rem;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comments-title svg {
    width: 28px;
    height: 28px;
    color: #818cf8;
}

.comments-count {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-left: auto;
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list > li {
    margin-bottom: 1.5rem;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1.5rem;
    border-left: 2px solid rgba(99, 102, 241, 0.15);
}

/* Comment Item */
.comment {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.comment:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.comment.bypostauthor {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255,255,255,0.03) 100%);
}

.comment-body {
    position: relative;
}

/* Comment Meta */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.comment-author .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.comment-author .fn {
    font-weight: 600;
    color: white;
    font-style: normal;
}

.comment-author .fn a {
    color: white;
    transition: color 0.3s ease;
}

.comment-author .fn a:hover {
    color: #818cf8;
}

.bypostauthor .comment-author .fn::after {
    content: 'Автор';
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #451a03;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.comment-metadata {
    margin-left: auto;
    font-size: 0.875rem;
    color: rgba(238, 242, 255, 0.5);
}

.comment-metadata a {
    color: rgba(238, 242, 255, 0.5);
    transition: color 0.3s ease;
}

.comment-metadata a:hover {
    color: #818cf8;
}

/* Comment Content */
.comment-content {
    color: rgba(238, 242, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 1rem;
    padding-left: calc(48px + 0.875rem);
}

.comment-content p {
    margin-bottom: 0.75rem;
}

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

.comment-content a {
    color: #818cf8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comment-content a:hover {
    color: #a5b4fc;
}

/* Reply Link */
.reply {
    padding-left: calc(48px + 0.875rem);
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: #818cf8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: white;
}

/* Comment Form */
.comment-respond {
    margin-top: 3rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    padding: 2rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.comment-reply-title small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.comment-reply-title small a {
    color: #ef4444;
    transition: color 0.3s ease;
}

.comment-reply-title small a:hover {
    color: #f87171;
}

.comment-notes {
    font-size: 0.875rem;
    color: rgba(238, 242, 255, 0.5);
    margin-bottom: 1.5rem;
}

/* Form Fields */
.comment-form {
    display: grid;
    gap: 1.25rem;
}

.comment-form p {
    margin: 0;
}

.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(238, 242, 255, 0.8);
    margin-bottom: 0.5rem;
}

.comment-form .required {
    color: #ef4444;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: rgba(238, 242, 255, 0.4);
}

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

/* Author, Email, URL Fields */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    grid-column: 1;
}

@media (min-width: 640px) {
    .comment-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .comment-form-comment,
    .comment-form-cookies-consent,
    .form-submit {
        grid-column: 1 / -1;
    }
}

/* Cookie Consent */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #6366f1;
}

.comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
    color: rgba(238, 242, 255, 0.6);
    font-size: 0.875rem;
}

/* Submit Button */
.form-submit {
    margin-top: 0.5rem;
}

.form-submit input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* Pingbacks & Trackbacks */
.pingback,
.trackback {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.pingback .comment-body,
.trackback .comment-body {
    font-size: 0.9375rem;
}

.pingback .comment-edit-link,
.trackback .comment-edit-link {
    margin-left: 0.5rem;
    color: #818cf8;
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 3rem;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    color: rgba(238, 242, 255, 0.6);
}

/* Comment Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.comment-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    color: #a5b4fc;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .comment-list .children {
        padding-left: 1rem;
    }
    
    .comment-content,
    .reply {
        padding-left: 0;
    }
    
    .comment-meta {
        flex-wrap: wrap;
    }
    
    .comment-metadata {
        width: 100%;
        margin-left: calc(48px + 0.875rem);
        margin-top: 0.25rem;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
}
