/* * Forum Pages Styles (Modern & Standalone - FINAL v4)
 * Dosya: /public/assets/css/pages/forum.css
 */

/* --- PAGE HEADER --- */
.forum-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.header-content {
    flex: 1;
    min-width: 280px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
    flex-wrap: wrap;
    line-height: 1.2;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.page-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* --- THREAD META BAR --- */
.thread-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.thread-meta-bar span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* --- CATEGORY LIST (index.php) --- */
.category-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-item-row:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    background: var(--bg-surface-hover);
    z-index: 1;
}

.category-icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--bg-body);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.category-item-row:hover .category-icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.category-main-info { min-width: 0; }

.category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.35rem 0;
    transition: color 0.2s;
}

.category-item-row:hover .category-title { color: var(--primary); }

.category-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats Group */
.category-stats-group { display: flex; align-items: center; gap: 1rem; }

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.stat-value { font-weight: 700; color: var(--text-main); font-size: 1.1rem; line-height: 1.2; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.stat-divider { width: 1px; height: 30px; background: var(--border-subtle); }

.category-action-icon {
    color: var(--border-subtle);
    font-size: 1.2rem;
    padding-left: 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.category-item-row:hover .category-action-icon {
    color: var(--primary);
    transform: translateX(5px);
}

/* --- THREAD LIST (category.php) --- */
.thread-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.thread-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.thread-item-row:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.thread-item-row.pinned {
    background-color: var(--bg-pinned);
    border-color: var(--warning);
}

.thread-author-avatar .avatar-md {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--bg-body);
    box-shadow: 0 0 0 1px var(--border-subtle);
}

.thread-main-info { min-width: 0; }

.thread-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.thread-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.thread-item-row:hover .thread-title { color: var(--primary); }

.icon-pinned { color: var(--warning); font-size: 0.9rem; }
.icon-locked { color: var(--danger); font-size: 0.9rem; }

.thread-meta-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-admin { 
    background: var(--primary); color: white; padding: 0.1rem 0.4rem; 
    border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; 
}

.meta-dot { font-size: 0.6rem; opacity: 0.5; margin: 0 0.2rem; }

.thread-stats-group {
    display: flex;
    gap: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-subtle);
}

.thread-stats-group .stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-muted);
}

.thread-stats-group i { font-size: 1rem; }
.thread-stats-group .stat-value { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }

/* --- THREAD DETAIL (thread.php) --- */
.forum-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* * GÜNCELLENDİ: Global Sidebar kalktığı için 
 * Profil kartı (220px) + İçerik (1fr) yapısı artık 1100px alana yayılacak.
 * Bu çok daha ferah bir okuma deneyimi sunar.
 */
.forum-post {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.forum-post.main-post {
    border-top: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.post-sidebar {
    background: var(--bg-body);
    border-right: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.post-avatar-lg { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg-surface); box-shadow: var(--shadow-sm); object-fit: cover; }
.post-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-surface); box-shadow: var(--shadow-sm); }

.post-author-name {
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
    word-break: break-all;
}
.post-author-name a { color: var(--text-main); text-decoration: none; }

.user-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.badge-user { background: var(--bg-body); color: var(--text-muted); border: 1px solid var(--border-subtle); padding: 0.25rem; font-size: 0.75rem; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.badge-author { background: var(--bg-surface); color: var(--primary); border: 1px solid var(--primary-ring); padding: 0.25rem; font-size: 0.75rem; border-radius: 4px; font-weight: 600; }

.user-stats {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.icon-star { color: var(--warning); }

.post-content-wrapper { display: flex; flex-direction: column; min-width: 0; }

.post-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-number { font-weight: 600; color: var(--text-muted); text-decoration: none; }

/* --- POST BODY --- */
.post-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
    flex: 1;
    overflow-wrap: break-word;
}

.post-body p { margin-bottom: 1rem; }

.post-body ul {
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin-bottom: 1rem;
}

.post-body ol {
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin-bottom: 1rem;
}

.post-body li {
    margin-bottom: 0.25rem;
}

.post-body a { color: var(--primary); text-decoration: underline; font-weight: 500; }
.post-body blockquote { border-left: 4px solid var(--primary-soft); background: var(--bg-body); padding: 1rem; margin: 1rem 0; color: var(--text-muted); font-style: italic; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 0.5rem 0; }

/* --- POST FOOTER & ACTIONS (DÜZELTİLDİ) --- */
.post-footer {
    padding: 1rem 2rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 1rem;
}

.post-actions-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-actions-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto; 
}

.btn-text-danger {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    transition: color 0.2s;
}
.btn-text-danger:hover {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.05);
}

/* --- FORMS --- */
.forum-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: visible;
    box-shadow: var(--shadow-sm);
}

.forum-card-body { padding: 2rem; }

.forum-form-group { margin-bottom: 1.5rem; }

.forum-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.forum-form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    background-color: var(--bg-body);
    color: var(--text-main);
    box-sizing: border-box;
}

.forum-form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
    background-color: var(--bg-surface);
}

.locked-category-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-wrapper.locked .forum-form-control {
    background-color: var(--bg-body);
    color: var(--text-muted);
    opacity: 0.7;
    cursor: not-allowed;
    padding-right: 2.5rem;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.has-icon { padding-right: 2.5rem; }

.custom-select-wrapper { position: relative; }
.custom-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}
.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    font-size: 0.8rem;
}

.forum-form-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.info-desc { display: flex; align-items: center; gap: 0.5rem; }

.forum-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 1.5rem;
}

.tox-tinymce {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-outline-secondary, .btn-outline {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-muted);
}
.btn-outline-secondary:hover, .btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
    background: var(--bg-body);
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}
.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-change-cat { padding: 0.8rem 1rem; white-space: nowrap; }

/* --- PAGINATION & EMPTY STATES --- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination-info { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }

.empty-state-card, .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    color: var(--border-focus);
    margin-bottom: 1rem;
}

/* --- LOGIN PROMPT (NEW MODERN DESIGN) --- */
.login-prompt-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.login-prompt-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 1rem;
    max-width: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Arkaplan Süslemesi (Glass Effect) */
.login-prompt-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, var(--primary-soft) 0%, transparent 60%);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.prompt-visual {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.prompt-icon-ring {
    width: 80px;
    height: 80px;
    background: var(--bg-surface);
    border: 2px solid var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

.prompt-content {
    position: relative;
    z-index: 1;
}

.prompt-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.prompt-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.prompt-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .forum-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .header-actions { width: 100%; }
    .header-actions .btn { width: 100%; justify-content: center; }

    /* Category List */
    .category-item-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
        padding: 1.25rem;
    }
    .category-icon-wrapper { grid-row: 1 / 3; align-self: start; }
    .category-stats-group { grid-column: 2 / 3; margin-top: 0.5rem; width: 100%; justify-content: flex-start; }
    .category-action-icon { display: none; }

    /* Thread List */
    .thread-item-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .thread-author-avatar { display: none; }
    .thread-stats-group {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-subtle);
        padding-top: 1rem;
        width: 100%;
        justify-content: space-around;
    }

    /* Post Detail */
    .forum-post { grid-template-columns: 1fr; }
    .post-sidebar {
        flex-direction: row;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        justify-content: flex-start;
        gap: 1rem;
        text-align: left;
    }
    .post-avatar-wrapper { margin: 0; }
    .post-avatar-lg, .post-avatar { width: 48px; height: 48px; border-width: 2px; }
    .post-author-name { margin: 0; font-size: 1rem; }
    .user-badges { display: none; }
    .user-stats { display: none; }
    
    .post-body { padding: 1.5rem; }
    
    /* Footer Mobilde Düzeltme */
    .post-footer {
        padding: 1rem 1.5rem;
    }
    
    /* Login Prompt Mobil */
    .prompt-actions { flex-direction: column; width: 100%; }
    .prompt-actions .btn { width: 100%; justify-content: center; }
}