/* Comments Section - YouTube Style */
.comments-area {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: Roboto, Arial, sans-serif;
    color: #131313;
    padding: 16px 10px;
    scroll-margin-top: 80px;
}

.comments-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Comment Locked/Sealed State */
.comment-locked-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.comment-locked-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    opacity: 0.1;
    pointer-events: none;
}

.lock-icon {
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.lock-message {
    font-size: 15px;
    color: #475569;
    margin-bottom: 20px;
    font-weight: 500;
}

.btn-login-comment {
    display: inline-block;
    background: #1e88e5;
    color: #fff;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(30, 136, 229, 0.2);
}

.btn-login-comment:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(30, 136, 229, 0.3);
}

/* Hide default heavy stuff */
.comment-form {
    display: flex;
    flex-direction: column;
}

.comment-notes,
.logged-in-as,
.comment-form label {
    display: none;
}

/* Input Styles */
.comment-form-input-wrapper {
    position: relative;
    width: 100%;
}

.comment-form textarea {
    width: 100%;
    min-height: 36px;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: #f6f6f6;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    overflow-y: hidden;
    line-height: 1.4;
    outline: none;
}

.comment-form textarea::placeholder {
    color: #606060;
}

/* Buttons */
.form-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.submit.btn-comment {
    background: #1E88E5;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    line-height: 1.2;
}

.submit.btn-comment:hover {
    background: #1976D2;
}

#cancel-comment-reply-link {
    background: transparent;
    color: #0f0f0f;
    border: none;
    padding: 0 16px;
    height: 36px;
    line-height: 36px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 18px;
    cursor: pointer;
    text-decoration: none;
}

#cancel-comment-reply-link:hover {
    background: #e5e5e5;
}

/* Comment List */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}

.comment-list>li {
    padding-bottom: 15px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-main-content {
    flex-grow: 1;
    min-width: 0;
    /* Text truncation fix */
}

/* Metadata */
.comment-meta {
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 18px;
}

.comment-author {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata {
    color: #606060;
    text-decoration: none;
    font-size: 12px;
}

/* Content */
.comment-text {
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 8px;
}

.comment-text p {
    margin: 0;
}

/* Actions */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.comment-reply-link {
    font-size: 12px;
    font-weight: 600;
    color: #606060;
    text-decoration: none;
    text-transform: none;
}

.comment-reply-link:hover {
    color: #131313;
}

/* Threaded Comments (Replies) */
/* Threaded Comments (Replies) */
.comment-list .children {
    list-style: none;
    margin: 0 0 0 56px;
    padding: 0;
}

/* Hide replies only at the top level (reply to main comment) */
.comment-list>li>.children {
    display: none;
}

/* Ensure deeper nested replies are always visible relative to their parent container */
.comment-list .children .children {
    display: block;
    margin-left: 0;
}

/* Toggle Replies Button */
.comment-replies-toggle {
    margin-top: 8px;
    margin-left: 56px;
    /* Align with content (40px avatar + 16px gap) */
}

.btn-toggle-replies {
    background: none;
    border: none;
    padding: 0;
    color: #065fd4;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    line-height: 1.2;
}

.btn-toggle-replies .toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
    display: inline-block;
    vertical-align: middle;
}

.btn-toggle-replies.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Deep nesting: Flatten reply hierarchy */
.comment-list .children .children {
    margin-left: 0;
}

.comment-list .children li {
    margin-top: 16px;
}

.comment-list .children .comment-avatar img {
    width: 24px;
    height: 24px;
}

/* Author Field (Guest) */
.comment-form-author-wrapper input {
    width: 100%;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    background: #f6f6f6;
    outline: none;
}

.comment-form-author-wrapper input::placeholder {
    color: #606060;
}

/* Parent Author Name in Reply */
.reply-symbol {
    color: #606060;
    margin: 0 4px;
    width: 10px;
    height: 10px;
    display: inline-block;
    vertical-align: middle;
}

.parent-author-name {
    color: #606060;
}

@media (max-width: 992px) {
    .comments-area {
        border: none;
        border-radius: 0;
    }
}