/* =============================================
   Sufirain – Professional Comment System CSS
   ============================================= */

/* ─── Comment Actions ──────────────────────── */
.sf-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Üç nokta menü (Yanıtla, Düzenle, Sil) */
.sf-comment-menu-wrap {
    position: relative;
}

.sf-comment-menu-trigger {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #9a8b81;
    font-size: 14px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.sf-comment-menu-trigger:hover {
    color: #b5653a;
    background: rgba(181, 101, 58, 0.08);
}

.sf-comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 160px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(181, 101, 58, 0.12);
    padding: 6px 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.sf-comment-menu-dropdown.sf-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sf-comment-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #4a3728;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sf-comment-menu-item:hover {
    background: rgba(181, 101, 58, 0.06);
    color: #b5653a;
}

.sf-comment-menu-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
}

.sf-comment-menu-item.sf-delete-btn:hover,
.sf-comment-menu-item.sf-admin-delete-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}

.sf-comment-action {
    font-size: 13px;
    color: #9a8b81;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sf-comment-action:hover {
    color: #b5653a;
    text-decoration: none;
    transform: translateY(-1px);
}

.sf-comment-action i {
    font-size: 12px;
}

/* ─── Like Button ──────────────────────────── */
.sf-like-btn.sf-liked {
    color: #e74c3c;
}

.sf-like-btn.sf-liked i {
    animation: sf-like-pop 0.4s ease;
}

@keyframes sf-like-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.sf-like-count {
    font-weight: 600;
}

/* ─── Reply Button ─────────────────────────── */
.sf-reply-btn:hover {
    color: #3b82f6 !important;
}

/* ─── Edit / Delete ────────────────────────── */
.sf-edit-btn:hover {
    color: #f59e0b !important;
}

.sf-delete-btn:hover,
.sf-admin-delete-btn:hover {
    color: #e74c3c !important;
}

/* ─── Role Badges ──────────────────────────── */
.sf-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 6px;
}

.sf-badge-admin {
    background: linear-gradient(135deg, #b5653a, #d4874d);
    color: #fff;
}

.sf-badge-editor {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
}

/* ─── Edited Tag ───────────────────────────── */
.sf-edited-tag {
    font-size: 11px;
    color: #9a8b81;
    font-style: italic;
    font-weight: 400;
}

/* ─── Inline Reply Form (YouTube tarzı, yorumun altında) ─── */
.sf-inline-reply-form {
    background: #faf8f5;
    border: 1px solid #e8e4df;
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 8px;
}

.sf-inline-reply-form .sf-inline-reply-textarea {
    width: 100%;
    border: 1px solid #e0ddd8;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Lora', serif;
    resize: vertical;
    min-height: 70px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sf-inline-reply-form .sf-inline-reply-textarea:focus {
    border-color: #b5653a;
    box-shadow: 0 0 0 3px rgba(181, 101, 58, 0.12);
}

.sf-inline-reply-slot {
    margin-left: 0;
}

/* ─── Replies ──────────────────────────────── */
.sf-replies-toggle {
    margin-top: 10px;
    margin-left: 70px;
}

.sf-replies-toggle a {
    font-size: 13px;
    color: #b5653a;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.sf-replies-toggle a:hover {
    color: #9a4f2a;
    text-decoration: none;
}

.sf-replies-container {
    margin-left: 40px;
    border-left: 2px solid rgba(181, 101, 58, 0.15);
    padding-left: 20px;
}

.sf-replies-list .comment-list {
    margin-bottom: 15px;
}

.sf-replies-list .single-comment .thumb img {
    width: 40px !important;
    height: 40px !important;
}

/* ─── Comment Item Enhancements ────────────── */
.sf-comment-item {
    transition: background-color 0.3s ease;
    border-radius: 8px;
    padding: 5px;
}

.sf-comment-item:hover {
    background-color: rgba(181, 101, 58, 0.03);
}

/* ─── Comment Form Enhancements ────────────── */
#comment-textarea {
    border: 1px solid rgba(181, 101, 58, 0.2);
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Lora', serif;
}

#comment-textarea:focus {
    border-color: #b5653a;
    box-shadow: 0 0 0 3px rgba(181, 101, 58, 0.1);
    outline: none;
}

/* ─── Reply Indicator ──────────────────────── */
#reply-indicator {
    background: #f8f4ef;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    color: #6b4a34;
    border-left: 3px solid #b5653a;
}

#reply-indicator a {
    color: #e74c3c;
    text-decoration: none;
    font-size: 13px;
}

#reply-indicator a:hover {
    text-decoration: underline;
}

/* ─── Comments Header ──────────────────────── */
.comments-header {
    border-bottom: 2px solid rgba(181, 101, 58, 0.1);
    padding-bottom: 15px;
}



/* ─── Guest Prompt ─────────────────────────── */
#guest-comment-section .boxed-btn {
    padding: 10px 25px;
    font-size: 14px;
}

/* ─── Toast Notifications (sağ üst, şık bildirim) ──────────────────── */
.sf-comment-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10002;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    max-width: 340px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sf-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.sf-toast-success {
    background: linear-gradient(135deg, #b5653a 0%, #9a4f2a 100%);
    color: #fff;
}

.sf-toast-error {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
}

.sf-toast-info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
}

/* ─── Loading Spinner ──────────────────────── */
#comments-loading {
    color: #b5653a;
    font-size: 15px;
}

#comments-loading .fa-spinner {
    font-size: 20px;
    margin-bottom: 8px;
}

/* ─── Comment content links ────────────────── */
.sf-comment-content .comment a {
    color: #b5653a;
    text-decoration: underline;
    word-break: break-all;
}

.sf-comment-content .comment a:hover {
    color: #9a4f2a;
}

/* ─── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .sf-replies-container {
        margin-left: 15px;
        padding-left: 12px;
    }

    .sf-comment-actions {
        gap: 8px;
    }

    .sf-comment-action {
        font-size: 12px;
    }

    .sf-comment-toast {
        top: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
        text-align: center;
        transform: translateY(-120%);
    }

    .sf-comment-toast.sf-toast-visible {
        transform: translateY(0);
    }

    .comments-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
    }

    .auth-comment-wrapper {
        flex-direction: column !important;
    }

    #comment-user-avatar {
        display: none;
    }
}

/* ─── Dark/alternative scrollbar for replies ── */
.sf-replies-list::-webkit-scrollbar {
    width: 4px;
}

.sf-replies-list::-webkit-scrollbar-thumb {
    background: rgba(181, 101, 58, 0.2);
    border-radius: 4px;
}