/* VGNW Forum Core Styles v6.0 (Thread Fix) */

/* --- GLOBAL RESET & FONTS --- */
.vgnw-forum-container, .vgnw-stream-container {
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin-bottom: 50px;
    color: #1c1c1c;
}
.vgnw-forum-container *, .vgnw-stream-container * {
    box-sizing: border-box;
}

/* ================= FORUM INDEX (ANASAYFA) ================= */
.vgnw-category-block { margin-bottom: 20px; border: 1px solid #dce0e6; border-radius: 6px; background: #fff; }
.vgnw-category-header { background: #f0f2f5; padding: 10px 15px; border-bottom: 1px solid #dce0e6; }
.vgnw-category-header h2 { margin: 0; font-size: 14px; font-weight: 700; color: #47a7eb; text-transform: uppercase; }

.vgnw-forum-row { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; }
.vgnw-forum-row:last-child { border-bottom: none; }
.vgnw-forum-row:hover { background: #fafbfc; }

.vgnw-row-main { flex: 1; display: flex; align-items: center; overflow: hidden; }
.vgnw-forum-icon { display: flex; align-items: center; justify-content: center; margin-right: 15px; flex-shrink: 0; }
.vgnw-forum-icon .dashicons { font-size: 28px; color: #aab2bd; width: 28px; height: 28px; }
.vgnw-forum-icon img { border-radius: 50%; width: 36px; height: 36px; } 

.vgnw-forum-info h3 { margin: 0; font-size: 15px; }
.vgnw-forum-info h3 a { text-decoration: none; color: #2c3e50; font-weight: 600; }
.vgnw-forum-desc { font-size: 12px; color: #888; margin-top: 2px; }

.vgnw-col-stat { width: 80px; text-align: center; font-size: 12px; color: #888; display: flex; flex-direction: column; justify-content: center; }
.stat-num { font-size: 14px; font-weight: 600; color: #4a5568; }

.vgnw-col-last { width: 220px; padding-left: 15px; border-left: 1px solid #f0f0f0; margin-left: 10px; flex-shrink: 0; }
.lp-wrapper { display: flex; align-items: center; gap: 10px; }
.lp-avatar img { border-radius: 50%; width: 28px; height: 28px; margin: 0; }
.lp-meta { display: flex; flex-direction: column; overflow: hidden; }
.lp-title { font-size: 12px; color: #2b70af; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.lp-sub { font-size: 11px; color: #999; }

/* ================= THREAD VIEW (STREAM LAYOUT) ================= */
.vgnw-thread-title-bar { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.vgnw-thread-title-bar h1 { font-size: 26px; margin: 0 0 5px 0; color: #1a1a1a; }
.thread-meta-top { font-size: 13px; color: #718096; }

/* Post Container */
.vgnw-post-item {
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 12px;
    padding: 15px; /* İç boşluk */
    position: relative;
}

/* Nesting (Dallanma) */
.children { list-style: none; padding: 0; margin: 0; }
.vgnw-forum-container .children .vgnw-post-item {
    margin-left: 25px; /* Ana girinti */
    padding-left: 20px; /* İçerik ve çizgi arasına boşluk */
    border-left: 2px solid #e2e8f0;
    margin-top: 10px;
    background: #fdfdfd; /* İç içe yorumlar için hafif farklı arka plan */
}

/* --- LAYOUT DÜZENİ (FLEX) --- */
.post-main-wrapper {
    display: flex;
    align-items: flex-start; /* Avatarı yukarı sabitle */
    flex-wrap: wrap; /* .children listesinin alta düşmesini sağlar */
    width: 100%;
}

/* Sol: Avatar */
.post-avatar-side {
    width: 40px;
    margin-right: 15px;
    flex-shrink: 0;
}
.post-avatar-side img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}

/* Sağ: İçerik Gövdesi */
.post-body-side {
    flex-grow: 1;
    min-width: 0; /* İçerik taşmasını önler */
}

/* Header: İsim, Badge, Tarih */
.post-header {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 13px;
}

.children {
    flex-basis: 100%; /* .children listesinin tüm genişliği kaplamasını sağlar */
    width: 100%;
}

.ph-user {
    font-weight: 700;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative; /* User Card için anchor */
}

.ph-meta {
    color: #999;
    font-size: 12px;
}

/* Content */
.post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1b;
    margin-bottom: 10px;
}
.vgnw-post-item .post-content {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 100px 100px 100px;
    padding: 10px 16px;
}
.post-content p { margin-bottom: 10px; }
.vgnw-post-item .post-content p { margin: 4px 0; }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.post-content img { max-width: 100%; height: auto; border-radius: 4px; }

/* Actions (Like, Reply, Share) */
.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pa-btn, .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #878a8c;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.pa-btn:hover, .comment-reply-link:hover {
    background: #f0f0f0;
    color: #1a1a1b;
}
.vgnw-svg { width: 18px; height: 18px; }
.dashicons { font-size: 16px; width: 16px; height: 16px; display: inline-block; }

/* Like state */
.pa-like-btn.is-liked { color: #0079d3; }
.pa-like-btn svg #fill1 { transition: fill 0.15s ease; }
.pa-like-btn.is-liked svg #fill1 { fill: currentColor; }


/* --- USER HOVER CARD (GİZLİ OLMASI GEREKEN) --- */
.vgnw-user-card {
    display: none; /* VARSAYILAN OLARAK GİZLİ */
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    border: 1px solid #e1e1e1;
    text-align: left;
    margin-top: 10px;
}
.vgnw-tooltip-trigger:hover .vgnw-user-card {
    display: block; /* HOVERDA AÇ */
}

/* Card Styling */
.uc-header { height: 60px; background: #33a7ff; border-radius: 8px 8px 0 0; }
.uc-avatar { margin-top: -30px; margin-left: 15px; float: left; }
.uc-avatar img { border: 3px solid #fff; border-radius: 50%; width: 64px; height: 64px; }
.uc-body { padding: 40px 15px 15px 15px; clear: both; }
.uc-body h4 { margin: 0 0 5px 0; font-size: 18px; color: #333; }
.uc-stats { display: flex; gap: 15px; font-size: 13px; margin-bottom: 10px; border-top: 1px solid #eee; padding-top: 10px; }
.uc-meta { font-size: 12px; color: #888; }


/* --- DROPDOWN MENU --- */
.pa-dropdown { position: relative; }
.pa-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid #eee; border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 10; min-width: 140px;
}
.pa-dropdown:hover .pa-menu { /* disabled hover open */ }
.pa-dropdown.is-open .pa-menu { display: block; }
.pa-menu a,
.pa-menu button {
    display: flex; align-items: center; gap: 8px; padding: 10px;
    color: #333; font-size: 13px; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.pa-menu a:hover,
.pa-menu button:hover { background: #f6f7f8; }
.pa-menu a.danger,
.pa-menu button.danger { color: #d93025; }


/* --- FORMS & MISC --- */
.vgnw-reply-container { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.reply-header { font-size: 16px; margin-bottom: 15px; }
#reply-section .reply-context { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
#vgnw-editor-container, #vgnw-thread-editor { background: #fff; min-height: 120px; border: 1px solid #ccc; border-radius: 0 0 4px 4px; }
.ql-toolbar { background: #f8f9fa; border-color: #ccc !important; border-radius: 4px 4px 0 0; }
.ql-container { border: none !important; }
.vgnw-btn-primary {
    background: #0079d3;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
}.vgnw-reply-container .reply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}
.vgnw-reply-container .reply-actions .vgnw-btn-primary {
    margin-top: 0;
}
.vgnw-reply-container .reply-actions .vgnw-btn-ghost {
    margin-top: 0;
}

/* Breadcrumb */
.vgnw-breadcrumb { font-size: 12px; color: #888; margin-bottom: 15px; }
.vgnw-breadcrumb a { color: #666; text-decoration: none; }

/* Node View Fixes */
.vgnw-node-header-new { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.vgnw-node-header-new h1 { font-size: 24px; margin: 0; }
.vgnw-btn-post-thread { background: #2b70af; color: #fff; padding: 8px 16px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; }
.vgnw-thread-list-header-new { display: flex; background: #f8f9fa; padding: 10px 15px; font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; }
.th-title { flex: 1; } .th-stats { width: 180px; text-align: center; } .th-last { width: 240px; text-align: right; }
.vgnw-thread-row-new { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.thread-main-info { flex: 1; display: flex; align-items: center; gap: 15px; }
.thread-stats-new { width: 180px; display: flex; gap: 15px; justify-content: center; }
.ts-item { text-align: center; font-size: 12px; } .ts-val { font-weight: 700; font-size: 14px; display: block; }
.thread-last-post-new { width: 240px; text-align: right; font-size: 12px; }

/* Thread stream specific overrides (single thread) */
.vgnw-stream-container .vgnw-post-item {
    background: transparent;
    border: none;
    border-bottom: none;
    border-radius: 0;
    margin: 0;
    padding: 12px 0;
}
.vgnw-stream-container .vgnw-post-item:last-child {
    border-bottom: none;
}
.vgnw-stream-container .children .vgnw-post-item {
    padding-left: 16px;
    margin-top: 8px;
    position: relative;
}

/* Comment stream layout: force single column inside forum thread */
.vgnw-comments-stream {
    margin-top: 10px;
    width: 100%;
}
.vgnw-comments-stream .comment-list {
    display: block !important;
    column-count: 1 !important;
    column-gap: 0 !important;
    grid-template-columns: none !important;
}
.vgnw-comments-stream .comment-list,
.vgnw-comments-stream .children {
    list-style: none;
    margin: 0;
    padding: 0;
}
.vgnw-comments-stream .comment {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    margin: 0 0 0 0 !important;
    padding: 0;
}

/* Connector lines for nested replies (thread view) */
.vgnw-comments-stream .children {
    position: relative;
    margin-left: 40px;
    padding-left: 0;
}
.vgnw-comments-stream .children::before {
    content: "";
    position: absolute;
    left: -20px;
    top: -90px;
    bottom: 132px;
    border-left: 2px solid #e2e8f0;
}
.vgnw-comments-stream .children .vgnw-post-item {
    position: relative;
}
.vgnw-comments-stream .children .vgnw-post-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 30px; /* avatar merkezine yakın */
    width: 25px;
    border-top: 2px solid #e2e8f0;
}

/* Mobil */
@media (max-width: 768px) {
    .vgnw-col-stat, .vgnw-col-last, .th-stats, .th-last, .thread-stats-new, .thread-last-post-new { display: none !important; }
    .vgnw-forum-container .children .vgnw-post-item {
        margin-left: 10px; /* Mobil için ana girinti */
        padding-left: 15px; /* Mobil için iç boşluk */
    }
}
button.vgnw-toggle-replies {
    background: none;
    font-size: 14px;
    color: black;
    border: 0;
    padding: 4px 0 4px 24px; /* solda çizgi için boşluk */
    text-align: left;
    cursor: pointer;
}
.vgnw-comments-stream .children > .vgnw-toggle-replies {
    position: relative;
}
.vgnw-comments-stream .children > .vgnw-toggle-replies::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 0.9em; /* yazının ortası */
    width: 20px;
    border-top: 2px solid #e2e8f0;
}
button.vgnw-toggle-replies:hover {
    background: none;
    font-size: 14px;
    color: black;
    border: 0;
    padding: 4px 0 4px 24px; /* solda çizgi için boşluk */
    text-align: left;
    cursor: pointer;
}

/* --- USER PROFILE SYSTEM --- */

.vgnw-profile-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #dce0e6;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

/* Header */
.vgnw-profile-header {
    position: relative;
}
.profile-cover {
    height: 150px;
    background: linear-gradient(135deg, #3182ce, #2c5282);
}
.profile-main {
    padding: 0 30px 20px 30px;
    display: flex;
    align-items: flex-end;
    position: relative;
    margin-top: -50px; /* Avatarı cover'ın üstüne çıkar */
}
.profile-avatar img {
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #fff;
}
.profile-info {
    margin-left: 20px;
    flex: 1;
    margin-bottom: 10px;
}
.pi-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-info h1 {
    margin: 0;
    font-size: 24px;
    color: #2d3748;
    line-height: 1.2;
}
.vgnw-role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #edf2f7;
    color: #4a5568;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.vgnw-role-badge.yönetici { background: #c53030; color: #fff; }
.vgnw-role-badge.moderatör { background: #38a169; color: #fff; }

.pi-meta {
    margin-top: 5px;
    font-size: 13px;
    color: #718096;
    display: flex;
    gap: 15px;
}
.pi-meta span { display: flex; align-items: center; gap: 4px; }

.vgnw-btn-edit {
    background: #fff;
    border: 1px solid #cbd5e0;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.2s;
}
.vgnw-btn-edit:hover { background: #f7fafc; color: #2d3748; }

/* Nav / Tabs */
.vgnw-profile-nav {
    display: flex;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    background: #fcfcfc;
    padding: 0 30px;
}
.vgnw-profile-nav a {
    padding: 15px 20px;
    text-decoration: none;
    color: #718096;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.vgnw-profile-nav a:hover { color: #2d3748; }
.vgnw-profile-nav a.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: #fff;
}

/* Content Area */
.vgnw-profile-content {
    padding: 30px;
    min-height: 300px;
    background: #fff;
}
.profile-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
    font-size: 18px;
    color: #2d3748;
}

/* Threads List in Profile */
.vgnw-mini-thread-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.vgnw-mini-thread-row:last-child { border-bottom: none; }
.mini-icon { margin-right: 10px; color: #cbd5e0; }
.mini-content { display: flex; flex-direction: column; }
.mini-content a { font-weight: 600; color: #2d3748; text-decoration: none; font-size: 14px; }
.mini-date { font-size: 11px; color: #a0aec0; }

/* Settings Form */
.vgnw-settings-form { max-width: 600px; }
.avatar-info { display: flex; align-items: center; gap: 15px; background: #f7fafc; padding: 10px; border-radius: 6px; }
.avatar-info img { border-radius: 50%; }
.avatar-info p { margin: 0; font-size: 12px; color: #718096; }

.vgnw-success-box {
    background: #c6f6d5; border: 1px solid #9ae6b4; color: #22543d;
    padding: 10px 15px; margin-bottom: 20px; border-radius: 4px;
}

/* Mobil Uyum */
@media (max-width: 768px) {
    .profile-main { flex-direction: column; align-items: center; text-align: center; margin-top: -75px; }
    .profile-info { margin-left: 0; margin-top: 10px; }
    .pi-top { justify-content: center; flex-direction: column; }
    .pi-meta { justify-content: center; }
    .vgnw-profile-nav { justify-content: center; padding: 0; }
    .vgnw-profile-nav a { padding: 12px 10px; font-size: 13px; }
}

/* --- NOTIFICATION SYSTEM --- */
.vgnw-notif-wrapper { position: relative; display: inline-block; margin-left: 15px; }

.vgnw-notif-trigger { 
    cursor: pointer; position: relative; color: #555; 
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background 0.2s;
}
.vgnw-notif-trigger:hover { background: #f0f0f0; color: #2b70af; }
.vgnw-notif-trigger .dashicons { font-size: 22px; width: 22px; height: 22px; }

.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: #e53e3e; color: #fff; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Dropdown Panel */
.vgnw-notif-dropdown {
    display: none; position: absolute; top: 45px; right: -10px;
    width: 320px; background: #fff; border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); border: 1px solid #e0e0e0;
    z-index: 1000; overflow: hidden;
}
.vgnw-notif-dropdown.active { display: block; animation: slideDown 0.2s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Ok (Triangle) */
.vgnw-notif-dropdown::after {
    content: ""; position: absolute; top: -6px; right: 18px;
    width: 12px; height: 12px; background: #fff; transform: rotate(45deg);
    border-left: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
}

.nd-header {
    padding: 12px 15px; background: #fff; border-bottom: 1px solid #eee;
    font-weight: 700; font-size: 14px; color: #333;
}

.nd-list { max-height: 350px; overflow-y: auto; }
.nd-loading { padding: 20px; text-align: center; color: #999; font-size: 12px; }

