/**
 * Comments Section Fix
 * Fixes nested box appearance in blog single pages
 */

/* Remove ALL wrapper boxes - only keep content */
.single-post .comments-section,
.single-post .comments-wrapper,
.single-post .comment-area-wrapper,
.single-post #comments {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Main comments area - THE ONLY BOX */
.single-post .comments-area {
    background: #fff !important;
    padding: 40px !important;
    border-radius: 10px !important;
    border: 1px solid #edf3f5 !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

/* Comment form container */
.single-post .comment-respond {
    background: transparent;
    padding: 0;
    margin-top: 30px;
    border: none;
}

/* Comment form title */
.single-post .comment-reply-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff5e14;
    display: inline-block;
}

/* Form styling */
.single-post .comment-form {
    background: transparent;
    padding: 0;
    border: none;
}

/* Logged in text */
.single-post .logged-in-as {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.single-post .logged-in-as a {
    color: #ff5e14;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-post .logged-in-as a:hover {
    color: #e54e0d;
    text-decoration: underline;
}

/* Comment textarea */
.single-post .comment-form-comment {
    margin-bottom: 20px;
}

.single-post .comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s ease;
    background: #fff;
}

.single-post .comment-form textarea:focus {
    outline: none;
    border-color: #ff5e14;
    box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.1);
}

/* Submit button */
.single-post .form-submit {
    margin-top: 20px;
    margin-bottom: 0;
}

.single-post .comment-form .submit {
    background: #ff5e14;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single-post .comment-form .submit:hover {
    background: #e54e0d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 94, 20, 0.3);
}

/* Comment list styling */
.single-post .comment-list {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
}

.single-post .comment-item,
.single-post .comment {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #edf3f5;
}

.single-post .comment-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.single-post .comment-author {
    flex-shrink: 0;
}

.single-post .comment-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.single-post .comment-content {
    flex: 1;
    margin-left: 0;
    margin-top: 0;
}

.single-post .comment-meta {
    margin-bottom: 10px;
}

.single-post .comment-meta h4,
.single-post .comment-author b,
.single-post .comment-author cite {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-style: normal;
}

.single-post .comment-metadata {
    font-size: 13px;
    color: #999;
}

.single-post .comment-metadata a {
    color: #999;
    text-decoration: none;
}

.single-post .comment-metadata a:hover {
    color: #ff5e14;
}

.single-post .comment-text {
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

.single-post .reply {
    margin-top: 10px;
    margin-left: 0;
}

.single-post .reply a,
.single-post .comment-reply-link {
    color: #ff5e14;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.single-post .reply a:hover,
.single-post .comment-reply-link:hover {
    color: #e54e0d;
    text-decoration: underline;
}

/* Nested comments */
.single-post .children {
    list-style: none;
    margin: 20px 0 0 40px;
    padding: 0;
}

.single-post .children .comment {
    background: #fff;
    border-left: 3px solid #ff5e14;
}

/* No comments message */
.single-post .no-comments {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Cancel reply link */
#cancel-comment-reply-link {
    color: #999;
    font-size: 14px;
    margin-left: 10px;
}

#cancel-comment-reply-link:hover {
    color: #ff5e14;
}

/* Required field message */
.required-field-message {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
}

.required {
    color: #ff5e14;
}

/* Remove any inline styles that might conflict */
.single-post .comments-area > style {
    display: none !important;
}

/* Additional cleanup for any nested containers */
.single-post .comment-container,
.single-post .comment-wrapper,
.single-post .comments-inner,
.single-post .comment-box,
.single-post .comments-box,
.single-post .comment-area,
.single-post article.comment-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Ensure only comment items have background */
.single-post .comment-list > li.comment {
    background: #f8f9fa !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    border: 1px solid #edf3f5 !important;
}

/* Override any theme default box styles */
.single-post .blog-single .comments-area,
.single-post .blog-details .comments-area,
.single-post .post-content .comments-area {
    background: #fff !important;
    border: 1px solid #edf3f5 !important;
    padding: 40px !important;
    border-radius: 10px !important;
}

/* Force remove double borders */
.single-post .comments-area .comments-area,
.single-post .comment-respond .comment-respond {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .single-post .comments-area {
        padding: 20px;
    }
    
    .single-post .comment-author img {
        width: 50px;
        height: 50px;
    }
    
    .single-post .children {
        margin-left: 20px;
    }
    
    .single-post .comment-form .submit {
        width: 100%;
    }
}