/* ========================================= */
/* İLAN DETAY SAYFASI STİLLERİ               */
/* ========================================= */

.ilan-detay-container {
    display: flex;
    gap: 40px;
    padding: 40px 0;
    align-items: flex-start; /* Yapışkan sidebar için gerekli */
}

/* --- SOL SÜTUN: ANA İÇERİK --- */
.ilan-ana-icerik {
    flex: 3;
    min-width: 0; /* Flex item içinde metin taşmasını önlemek için kritik! */
}

/* Başlık ve Favori Butonu Grubu */
.ilan-baslik-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.ilan-baslik-metin {
    flex: 1; /* Başlık alanını esnek yap */
}

.ilan-baslik {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.2;
    word-wrap: break-word; /* Uzun başlıkları kır */
}

.ilan-meta {
    display: flex;
    flex-wrap: wrap; /* Meta bilgileri sığmazsa alt satıra geçsin */
    gap: 15px;
    color: #777;
    margin-bottom: 15px;
    font-size: 14px;
}

/* İlan Durum Etiketleri */
.ilan-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}
.status-yayinda {
    background-color: #28a745;
}
.status-kaldirildi {
    background-color: #dc3545;
}
.status-onayda {
    background-color: #ffc107;
    color: #333;
}

/* Favori Butonu */
.favori-butonu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Butonun küçülmesini engelle */
}
.favori-butonu:hover {
    background-color: #e9ecef;
}
.favori-butonu.favorilendi {
    background-color: #fff0f3;
    border-color: #e41e3f;
    color: #e41e3f;
}
.favori-butonu.favorilendi i {
    color: #e41e3f;
}

.ilan-fiyat-detay {
    font-size: 36px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 25px;
}

/* --- YÖNETİM PANELİ --- */
.ilan-yonetim-paneli {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.ilan-yonetim-paneli h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #343a40;
}
.yonetim-butonlari {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.yonetim-butonu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    background-color: #fff;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}
.yonetim-butonu:hover {
    background-color: #f0f2f5;
    border-color: #007bff;
    color: #007bff;
}

/* Sil Butonu Özel Stil */
.yonetim-butonu-sil {
    color: #dc3545;
    border-color: #dc3545;
}
.yonetim-butonu-sil:hover {
    background-color: #dc3545;
    color: #fff;
}

/* --- DETAY VE AÇIKLAMA BÖLÜMLERİ --- */
.detay-bolumu {
    margin-bottom: 30px;
}
.detay-bolumu h2 {
    font-size: 22px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.detay-bolumu ul {
    list-style: none;
    padding: 0;
}
.detay-bolumu ul li {
    padding: 8px 0;
    display: flex;
    border-bottom: 1px solid #f9f9f9;
}
.detay-bolumu ul li strong {
    flex-basis: 180px;
    color: #555;
    flex-shrink: 0;
}

.detay-bolumu p {
    line-height: 1.7;
    color: #444;
    /* METİN TAŞMASINI ÖNLEYEN KRİTİK KODLAR */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* --- YORUMLAR BÖLÜMÜ --- */
.yorumlar-bolumu {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.yorum-formu {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}
.yorum-formu img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}
.yorum-formu textarea {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 48px;
}
.yorum-formu .submit-btn {
    width: auto;
    flex-shrink: 0;
    padding: 12px 25px;
    font-size: 16px;
    margin-top: 0;
    align-self: flex-start;
}

.yorum-listesi {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.yorum-item {
    display: flex;
    gap: 15px;
}
.yorum-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.yorum-govdesi {
    flex-grow: 1;
    min-width: 0; /* Taşmayı önler */
}
.yorum-yazar {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}
.yorum-yazar strong {
    color: #333;
}

.yorum-govdesi p {
    margin-bottom: 10px;
    /* METİN TAŞMASINI ÖNLEYEN KRİTİK KODLAR */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.yanitla-btn {
    background: none;
    border: none;
    color: #007bff;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}
.yorum-yanitlari {
    margin-top: 20px;
    padding-left: 20px;
    border-left: 3px solid #f0f2f5;
}
.yorum-yanitlari .yorum-item {
    margin-bottom: 20px;
}
.yorum-yanitlari .yorum-item:last-child {
    margin-bottom: 0;
}

/* --- SAĞ SÜTUN: KULLANICI KARTI --- */
.ilan-sidebar {
    flex: 1;
    min-width: 300px;
} /* Genişlik sınırı */
.kullanici-karti {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    text-align: center;
    position: sticky;
    top: 100px;
}
.kullanici-karti img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #eee;
}
.kullanici-karti h3 {
    font-size: 20px;
    margin-bottom: 5px;
}
.kullanici-unvan {
    color: #888;
    margin-bottom: 20px;
}
.iletisim-bilgileri {
    text-align: left;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}
.iletisim-bilgileri h4 {
    margin-bottom: 15px;
    font-size: 16px;
}
.iletisim-bilgileri p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}
.kullanici-karti .submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 15px;
}

/* Şikayet Et */
.sikayet-et-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.sikayet-et-container a {
    color: #888;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}
.sikayet-et-container a:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* Yanıt Formu Şablonu */
.yanit-formu-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.yanit-formu-container img {
    width: 35px;
    height: 35px;
}
.yanit-form-govdesi {
    flex-grow: 1;
}
.yanit-formu-container textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    font-size: 14px;
    resize: vertical;
}
.yanit-form-butonlar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.yanit-form-butonlar .submit-btn, .yanit-form-butonlar .iptal-btn {
    padding: 6px 12px;
    font-size: 13px;
    margin: 0;
    width: auto;
}
.iptal-btn {
    background-color: #f0f2f5;
    color: #333;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 5px;
}

/* Profili Görüntüle Butonu Stili */
.profil-goruntule-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px; /* Mesaj Gönder butonuyla arayı aç */
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profil-goruntule-btn:hover {
    background-color: #e9ecef;
    color: #007bff;
    border-color: #007bff;
}

/* İlan Hata/Bilgi Ekranı Stilleri */
.ilan-hata-container {
    text-align: center;
    padding: 60px 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    margin: 20px auto;
    max-width: 600px;
}

.ilan-hata-icon {
    font-size: 60px;
    color: #6c757d; /* Gri varsayılan */
    margin-bottom: 20px;
    display: block;
}

/* İkona göre renkler */
.ilan-hata-icon.fa-clock { color: #ffc107; } /* Sarı - Onayda */
.ilan-hata-icon.fa-eye-slash { color: #dc3545; } /* Kırmızı - Kaldırıldı */
.ilan-hata-icon.fa-trash-can { color: #343a40; } /* Koyu Gri - Silindi */

.ilan-hata-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.ilan-hata-desc {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ========================================= */
/* MOBİL UYUMLULUK (RESPONSIVE)              */
/* ========================================= */
@media (max-width: 992px) {
    .ilan-detay-container {
        flex-direction: column; /* Yan paneli alta al */
    }
    .ilan-sidebar {
        width: 100%; /* Tam genişlik */
        min-width: 0;
        order: 2; /* En alta gönder */
    }
    .kullanici-karti {
        position: static; /* Sticky özelliğini kaldır */
    }
    .ilan-ana-icerik {
        width: 100%;
        order: 1;
    }
}

@media (max-width: 576px) {
    /* Başlık ve Butonları Dikey Yap */
    .ilan-baslik-header {
        flex-direction: column;
        gap: 10px;
    }
    .favori-butonu {
        width: 100%; /* Tam genişlik buton */
        justify-content: center;
    }

    .ilan-baslik {
        font-size: 24px;
    }
    .ilan-fiyat-detay {
        font-size: 28px;
    }

    /* Yönetim butonlarını dikey yap */
    .yonetim-butonlari {
        flex-direction: column;
    }
    .yonetim-butonu {
        width: 100%;
        justify-content: center;
    }

    /* Detay Listesini Düzenle */
    .detay-bolumu ul li {
        flex-direction: column;
        gap: 5px;
    }
    .detay-bolumu ul li strong {
        flex-basis: auto;
        font-weight: 700;
    }

    /* Yorum Formu - GÜNCELLENDİ */
    .yorum-formu {
        flex-direction: column; /* Alt alta diz */
        gap: 10px; /* Elemanlar arası boşluk */
    }

    /* Profil resmini mobilde gizle (yer kazanmak için) */
    .yorum-formu img {
        display: none;
    }

    /* Textarea tam genişlik olsun */
    .yorum-formu textarea {
        width: 100%;
        box-sizing: border-box; /* Padding'i genişliğe dahil et */
        margin-right: 0; /* Varsa sağ boşluğu sıfırla */
    }

    /* Gönder butonu tam genişlik olsun */
    .yorum-formu .submit-btn {
        width: 100%;
        margin-left: 0; /* Varsa sol boşluğu sıfırla */
        align-self: stretch; /* Butonu kapsayıcı genişliğine yay */
    }

    /* Yanıt formu için de aynısını yap */
    .yanit-formu-container {
        flex-direction: column;
    }
    .yanit-formu-container img {
        display: none;
    }
    .yanit-form-butonlar {
        justify-content: space-between; /* Butonları iki uca yay */
        width: 100%;
    }
    .yanit-form-butonlar .submit-btn,
    .yanit-form-butonlar .iptal-btn {
        flex: 1; /* Butonlar eşit genişlikte olsun */
    }

    /* Yorum Listesi */
    .yorum-item {
        gap: 10px;
    }
    .yorum-item img {
        width: 40px;
        height: 40px;
    }
    .yorum-yanitlari {
        padding-left: 10px;
    }
}