/*
 * bbPress Tema Uyumu
 * Bu dosya, bbPress'in sitenin genel temasına (fontlar, renkler ve form elemanları) daha iyi uyum sağlaması için
 * varsayılan ayarları ezer. Güncellemelerden etkilenmez.
 */

/* Genel Font ve Renk Uyumu */
#bbpress-forums,
#bbpress-forums * {
    font-family: inherit !important;
}

#bbpress-forums {
    font-size: inherit;
    color: inherit;
}

/* Link renklerini tema ile aynı yapma */
#bbpress-forums a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}
#bbpress-forums a:hover {
    opacity: 0.8;
}

/* Başlıkların Uyumu */
#bbpress-forums h1, #bbpress-forums h2, #bbpress-forums h3, #bbpress-forums h4 {
    font-family: inherit !important;
    font-weight: bold;
    color: inherit;
}

/* Form Elemanları (Input, Textarea, Button) Uyumu */
#bbpress-forums input[type="text"],
#bbpress-forums input[type="password"],
#bbpress-forums textarea,
#bbpress-forums select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc; /* Temanın varsayılan form rengine uyum sağlar */
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 10px;
}

#bbpress-forums input[type="submit"],
#bbpress-forums button {
    background-color: var(--wp--preset--color--primary, #0073aa); /* Eğer site değişken kullanıyorsa onu alır */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

#bbpress-forums input[type="submit"]:hover,
#bbpress-forums button:hover {
    opacity: 0.9;
}

/* Forum listesi arka plan ve çizgiler */
#bbpress-forums ul.bbp-lead-topic, 
#bbpress-forums ul.bbp-topics, 
#bbpress-forums ul.bbp-forums, 
#bbpress-forums ul.bbp-replies {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: inherit;
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Avatar Yuvarlama ve Uyumu */
#bbpress-forums img.avatar {
    border-radius: 50% !important; /* Modern görünüm için avatarları yuvarlak yapar */
    border: none;
}

/* Modern Responsive Düzenlemeler */
@media screen and (max-width: 480px) {
    #bbpress-forums div.bbp-topic-author, 
    #bbpress-forums div.bbp-reply-author {
        float: none;
        width: 100%;
        text-align: left;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    #bbpress-forums div.bbp-topic-author img.avatar, 
    #bbpress-forums div.bbp-reply-author img.avatar {
        margin: 0;
        float: none;
    }
    #bbpress-forums div.bbp-topic-content, 
    #bbpress-forums div.bbp-reply-content {
        margin-left: 0;
        padding: 0;
    }
}

/* Yeni Mesajları (Son 24 Saat) Vurgulama */
#bbpress-forums li.bbp-body ul.highlight-new-topic,
#bbpress-forums li.bbp-body ul.highlight-new-topic:nth-child(odd),
#bbpress-forums li.bbp-body ul.highlight-new-topic:nth-child(even) {
    background-color: rgba(255, 152, 0, 0.08) !important; /* Hafif turuncu vurgu rengi */
    border-left: 4px solid #ff9800; /* Sol tarafına belirgin turuncu çizgi */
    transition: background-color 0.3s ease;
}

#bbpress-forums li.bbp-body ul.highlight-new-topic:hover {
    background-color: rgba(255, 152, 0, 0.15) !important;
}

/* -------------------------------------------------------------
 * 5 Mijarên Nû / 5 Bersivên Nû (Custom Latest Section)
 * ------------------------------------------------------------- */
.bbp-custom-latest-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    clear: both;
    width: 100%;
}

.bbp-custom-latest-card {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

.bbp-custom-latest-title {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.bbp-custom-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bbp-custom-latest-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f4f4f4;
}

.bbp-custom-latest-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bbp-latest-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.bbp-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 12px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.badge-topic {
    background-color: #ff5722; /* Turuncu - Mijar */
}

.badge-reply {
    background-color: #0073aa; /* Mavi - Bersiv */
}

.bbp-latest-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3338;
    text-decoration: none;
    line-height: 1.4;
    word-break: break-word;
}

.bbp-latest-item-title:hover {
    color: #0073aa;
    text-decoration: underline;
}

.bbp-latest-item-meta {
    font-size: 12px;
    color: #777;
    margin-left: 36px; /* Badge genişliği kadar boşluk */
}

.bbp-latest-item-meta a {
    color: #555;
    font-weight: 500;
}

.bbp-latest-item-meta img.avatar {
    vertical-align: middle;
    margin-right: 4px;
}

/* -------------------------------------------------------------
 * Bibe Abone / Bijare (Subscribe/Favorite) Butonlarını Taşıma
 * ------------------------------------------------------------- */
/* Orijinal linkleri gizliyoruz (bunlar temanın neresinde olursa olsun gizlenecek) */
.subscription-toggle,
.favorite-toggle {
    display: none !important;
}

/* Kendi eklediğimiz kapsayıcı içindeki linklerin stili (bunlar gizlenmeyecek) */
.bbp-custom-action-links .subscription-toggle,
.bbp-custom-action-links .favorite-toggle {
    display: inline-block !important;
}

.bbp-custom-action-links a {
    color: #0073aa !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bbp-custom-action-links a:hover {
    color: #ff5722 !important;
    text-decoration: underline;
}
