/* TimesBull Enhanced Comments - Modern Design */
.tbe-comments-wrap {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Comments Title */
.tbe-comments-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbe-comments-title:before {
    content: "💬";
    font-size: 20px;
}

.tbe-comments-count {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

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

.tbe-comment-list .children {
    list-style: none;
    margin: 0 0 0 40px;
    padding: 0;
}

.tbe-comment {
    margin: 0 0 25px 0;
    padding: 0;
    position: relative;
}

.tbe-comment-body {
    position: relative;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tbe-comment-body:hover {
    background: #fff;
    border-color: #e74c3c;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.1);
}

/* Comment Meta */
.tbe-comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.tbe-comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbe-comment-author .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    padding: 2px;
    object-fit: cover;
}

.tbe-comment-author .fn {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    text-decoration: none;
}

.tbe-comment-author .fn:hover {
    color: #e74c3c;
}

.tbe-comment-metadata {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbe-comment-metadata a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tbe-comment-metadata a:hover {
    color: #e74c3c;
}

.tbe-comment-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tbe-comment-time:before {
    content: "🕒";
    font-size: 12px;
}

.tbe-comment-edit-link {
    color: #3498db !important;
}

.tbe-comment-edit-link:hover {
    color: #2980b9 !important;
}

/* Comment Content */
.tbe-comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}

.tbe-comment-content p {
    margin: 0 0 10px 0;
}

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

/* Emoji Reactions */
.tbe-emoji-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.tbe-emoji-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #666;
    line-height: 1;
}

.tbe-emoji-btn:hover {
    border-color: #e74c3c;
    background: #fff5f5;
    transform: translateY(-1px);
}

.tbe-emoji-btn.active {
    border-color: #e74c3c;
    background: #fff5f5;
    color: #e74c3c;
}

.tbe-emoji-icon {
    font-size: 14px;
}

.tbe-emoji-count {
    font-weight: 600;
    font-size: 12px;
    min-width: 16px;
    text-align: center;
}

/* Comment Reply */
.tbe-reply {
    margin-top: 15px;
}

.tbe-comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    color: #555;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.tbe-comment-reply-link:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.tbe-comment-reply-link:before {
    content: "↩️";
    font-size: 12px;
}

/* Comment Navigation */
.comment-navigation {
    margin: 30px 0;
    text-align: center;
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-navigation .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    transition: all 0.2s ease;
}

.comment-navigation .page-numbers.current {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.comment-navigation .page-numbers:hover:not(.current) {
    background: #e9ecef;
    color: #333;
}

/* Comment Form */
#respond {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.tbe-comment-reply-title {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbe-comment-reply-title:before {
    content: "💬";
    font-size: 18px;
}

.tbe-comment-reply-title small {
    margin-left: auto;
    font-size: 14px;
    color: #888;
}

.tbe-comment-notes {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form p {
    margin: 0;
}

.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url {
    width: 100%;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: #333;
}

.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: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

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

.comment-form .form-submit {
    margin: 10px 0 0 0;
}

.comment-form .submit {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-form .submit:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.comment-form .submit:active {
    transform: translateY(0);
}

.comment-form .submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.comment-form .tbe-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Logged in user */
.logged-in-as {
    background: #e8f4fd;
    border: 1px solid #b6dfff;
    color: #0c5460;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.logged-in-as a {
    color: #0c5460;
    text-decoration: none;
    font-weight: 500;
}

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

/* Awaiting Moderation */
.comment-awaiting-moderation {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 0;
    border: 1px solid #ffeaa7;
    font-weight: 500;
}

/* Messages */
.tbe-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

.tbe-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tbe-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Comments Closed */
.comments-closed {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

/* Character Counter */
.tbe-char-counter {
    font-size: 12px;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

.tbe-char-counter.warning {
    color: #f39c12;
}

.tbe-char-counter.error {
    color: #e74c3c;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tbe-comments-wrap {
        padding: 20px;
        margin: 20px 0;
    }
    
    .tbe-comments-title {
        font-size: 20px;
    }
    
    .tbe-comment-body {
        padding: 15px;
    }
    
    .tbe-comment-author .avatar {
        width: 40px;
        height: 40px;
    }
    
    .tbe-comment-list .children {
        margin-left: 20px;
    }
    
    #respond {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .tbe-comment-reply-title {
        font-size: 18px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tbe-comments-wrap {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .tbe-comments-title {
        color: #fff;
    }
    
    .tbe-comment-body {
        background: #222;
        border-color: #333;
        color: #ccc;
    }
    
    .tbe-comment-body:hover {
        background: #2a2a2a;
        border-color: #e74c3c;
    }
    
    .tbe-comment-author .fn {
        color: #fff;
    }
    
    .tbe-comment-content {
        color: #ccc;
    }
    
    .tbe-comment-metadata {
        color: #aaa;
    }
    
    .tbe-emoji-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #aaa;
    }
    
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .logged-in-as {
        background: #1c3d4d;
        border-color: #2c5d7d;
        color: #cce7ff;
    }
    
    .no-comments,
    .comments-closed {
        background: #222;
        border-color: #333;
        color: #aaa;
    }
}
