/* Kur'an Oku Eklentisi Stilleri - Son Ayarlanmış Hali */

/* Genel Wrapper Stilleri */
.kuran-okuyucu-wrapper {
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    line-height: 1.7;
    color: #444;
    background-color: #fdfaf4;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.kuran-okuyucu-wrapper h3 {
    text-align: center;
    color: #5d493b;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: normal;
}

/* Araç Çubuğu Genel Yapısı */
.kuran-toolbar-wrapper {
    display: flex;
    align-items: flex-start; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 25px;
    padding: 12px;
    border: 1px solid #e0d8cc;
    border-radius: 6px;
    background-color: #f5f0e8;
}

/* Kontrol Düğmeleri Grubu (Font, Ayet No) */
.kuran-toolbar-controls-group {
    display: flex;
    align-items: center;
    gap: 8px; 
    flex-shrink: 0; 
    order: 2; /* Kontrol butonlarını sağa almak için */
}

.kuran-toolbar-wrapper .font-control-btn { 
    padding: 10px 15px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 4px;
    min-width: 48px;
    text-align: center;
    color: #333;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.kuran-toolbar-wrapper .font-control-btn:hover {
    background-color: #e5e5e5;
    border-color: #b5b5b5;
}
.kuran-toolbar-wrapper .font-control-btn:active {
    background-color: #dcdcdc;
    transform: translateY(1px);
}
.kuran-toolbar-wrapper .ayah-toggle-btn { padding: 10px 12px; }
.kuran-toolbar-wrapper .ayah-toggle-btn span { font-size: 0.9em; line-height: 1; }
.kuran-toolbar-wrapper .ayah-toggle-btn.active {
    background-color: #b0c4de; border-color: #9ab0c9; color: #2a3a4a;
}
.kuran-toolbar-wrapper .meal-toggle-btn { padding: 10px 12px; }
.kuran-toolbar-wrapper .meal-toggle-btn.active { 
    background-color: #add8e6; border-color: #90c3d4; color: #2c3e50;
}
.kuran-toolbar-wrapper .meal-toggle-btn span { font-weight: bold; }

/* Dropdown Menüleri İçeren Grup */
.kuran-toolbar-selects-group {
    display: flex;   
    flex-grow: 1;    
    gap: 10px;      
    align-items: stretch; 
    min-width: 0; 
    order: 1; /* Açılır menüleri sola almak için */
}

.kuran-toolbar-selects-group .sure-secim-form-container { 
    flex: 1; 
    display: flex; 
}

.kuran-toolbar-selects-group .sure-secim-actual-form { 
    display: flex;
    align-items: center; 
    width: 100%; 
    gap: 5px; 
}

.kuran-toolbar-selects-group .sure-secim-actual-form label {
    white-space: nowrap; 
    margin-bottom: 0; 
    font-size: 0.85em; 
    color: #5d493b;
    margin-right: 3px; 
    flex-shrink: 0; 
}

.kuran-toolbar-selects-group .sure-secim-actual-form select.kuran-select { 
    padding: 12px 10px; 
    font-size: 0.9em;   
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;    
    box-sizing: border-box; 
    line-height: normal; 
    background-color: #fff;
    color: #444; 
    height: auto;
}

.kuran-toolbar-wrapper .sure-secim-actual-form .noscript-submit-btn {
    padding: 10px 15px;
    background-color: #796454;
    color: #fff;
    border: 1px solid #796454;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

/* Kur'an İçerik Alanı */
.kuran-okuyucu-icerik-wrapper {
    margin-top: 20px;
    padding: 25px;
    border: 1px solid #e0d8cc;
    border-radius: 5px;
    background-color: #fdfaf4;
    position: relative;
}

.sure-goruntuleme-alani h4 { 
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #d3c8bc;
    padding-bottom: 15px;
    font-size: 1.5em;
    color: #796454;
    font-weight: normal;
}

#kuran-ayetler-container {
    text-align: justify; /* Mushaf gibi metni iki yana yaslar */
    direction: rtl;
    font-family: "KFGQPC Uthman Taha Naskh", "Traditional Arabic", "Noto Naskh Arabic", "Scheherazade New", serif;
    color: #333;
    padding: 0 10px;
    white-space: normal !important; 
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 2.8; /* Ayetlerin ve harekelerin birbirine girmemesi için ideal yükseklik */
}

.ayet-blogu {
    display: inline !important; 
    margin: 0 !important;
    margin-left: 15px !important; /* Ayet numarası kapansa bile kalacak olan boşluk */
    padding: 0 !important;
    border-bottom: none !important;
    white-space: normal;
}

/* Ayet numarası görünürken numaranın kendi boşluğunu da ayarlar */
.sure-goruntuleyici-ayet-numarasi {
    margin-left: 5px; 
    margin-right: 5px;
    display: inline-block;
}

.ayet-metni-ana-kisim {
    display: inline;
}

.sure-goruntuleyici-ayet-numarasi {
    color: #8c7b70;
    font-weight: normal;
    font-size: 0.85em;
    font-family: inherit;
    white-space: nowrap;
    display: inline-block; /* Numara şeklinin korunması için */
    vertical-align: middle;
    margin: 0 5px; /* Ayet sonu numarası ile metin arası boşluk */
    cursor: pointer;
}

#kuran-ayetler-container.ayet-numaralari-gizli .sure-goruntuleyici-ayet-numarasi {
    display: none !important; 
}

.ayet-meali {
    display: none; 
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    font-size: 15px; /* Meallerin okunaklılığı için ayarlandı */
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border-left: 4px solid #796454;
    text-align: left;
    direction: ltr;
    width: 100%; /* Meal açıldığında tam satır kaplamasını sağlar */
    clear: both;
}

#kuran-ayetler-container.mealler-gorunur .ayet-meali {
    display: block;
}

/* Sayfalama Navigasyonu */
.sayfalama-navigasyon {
    margin-top: 35px;
    text-align: center;
    padding: 15px 0;
}
.sayfalama-navigasyon ul.page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.sayfalama-navigasyon .page-numbers {
    padding: 10px 20px;
    margin: 0;
    border: 1px solid #d3c8bc;
    text-decoration: none;
    color: #796454;
    background-color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    display: inline-block;
    font-weight: 500;
}
.sayfalama-navigasyon a.page-numbers:hover {
    background-color: #796454;
    color: #fff;
    border-color: #6a5445;
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
}

/* === GÜNCELLEME: Sayfa numaralarını ve noktaları gizlemek için güvenli kurallar === */
/* Noktalar zaten PHP'de silindi, bu CSS sadece sayfa numaralarını gizler. */
.sayfalama-navigasyon ul.page-numbers li .page-numbers:not(.prev):not(.next),
.sayfalama-navigasyon ul.page-numbers li .page-numbers.current {
    display: none !important;
}

/* "Geri" ve "İleri" butonlarının her zaman görünür olmasını garantile */
.sayfalama-navigasyon ul.page-numbers li .page-numbers.prev,
.sayfalama-navigasyon ul.page-numbers li .page-numbers.next {
    display: inline-block !important;
}
/* === GÜNCELLEME SONU === */


/* Bilgi ve Hata Mesajları */
.kuran-okuyucu-bilgi {
    padding: 10px 15px; border: 1px solid #d3c8bc; border-radius: 4px; margin-bottom: 15px;
    background-color: #f5f0e8; color: #5d493b; text-align: center;
}

/* ---------------------------------------------------- */
/* MOBİL CİHAZLAR İÇİN STİLLER                         */
/* ---------------------------------------------------- */
@media (max-width: 767px) { 
    .kuran-okuyucu-wrapper {
        padding: 15px;
    }
    
    .kuran-toolbar-wrapper {
        flex-direction: column; 
        align-items: stretch;  
        gap: 15px;
    }

    .kuran-toolbar-selects-group { order: 1; }
    .kuran-toolbar-controls-group { order: 2; margin-top: 5px; }
    
    .kuran-toolbar-controls-group { 
        justify-content: space-around; 
    }
    .kuran-toolbar-wrapper .font-control-btn {
        padding: 10px;
        font-size: 16px;
        flex-grow: 1; 
        flex-basis: 0; 
    }
    
    .kuran-toolbar-selects-group { 
        flex-direction: column; 
        gap: 12px;
    }
    .kuran-toolbar-selects-group .sure-secim-actual-form {
        flex-direction: column; 
        align-items: stretch;
        gap: 5px;
    }
    .kuran-toolbar-selects-group .sure-secim-actual-form label {
        text-align: left;
        margin-right: 0;
        font-size: 0.9em;
    }
    .kuran-toolbar-selects-group .sure-secim-actual-form select.kuran-select {
        padding: 10px; 
    }
    
    #kuran-ayetler-container { font-size: 20px; line-height: 2.0; } 
    .ayet-blogu { line-height: 2.0; margin-left: 0; } 
    .sure-goruntuleyici-ayet-numarasi { font-size: 0.7em; } 

    .ayet-meali { 
        /* Mobil için olan font-size satırı SİLİNDİ. Artık ana kural geçerli. */
        padding: 7px 9px; 
    }

    .sayfalama-navigasyon .page-numbers { padding: 8px 12px; font-size: 0.9em; }
}

@media (max-width: 480px) { 
    .kuran-okuyucu-wrapper { padding: 8px; }

    .kuran-toolbar-wrapper .font-control-btn { padding: 8px; font-size: 15px; }

    .kuran-toolbar-selects-group .sure-secim-actual-form select.kuran-select {
        padding: 8px;
    }
    
    .sure-goruntuleme-alani h4 { font-size: 1.1em; }
    
    #kuran-ayetler-container { font-size: 18px; line-height: 1.9; } 
    .sure-goruntuleyici-ayet-numarasi { font-size: 0.65em; } 
    .ayet-blogu { line-height: 1.9; } 

    .ayet-meali {
        /* En küçük ekran için olan font-size satırı da SİLİNDİ. Artık ana kural geçerli. */
    }
    
    .sayfalama-navigasyon .page-numbers { padding: 7px 10px; font-size: 0.85em; }
}
/* --- Yer İmi (Bookmark) Sistemi Stilleri --- */

/* Yer imi butonunu ve listesini içeren grup */
.kuran-toolbar-bookmark-group {
  position: relative; /* Açılır listenin konumlandırılması için */
  margin-top: 10px;
}

#toggle-bookmarks-btn span {
  margin-right: 5px;
}

/* Yer imi listesi ana kapsayıcısı */
.bookmarks-list {
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  margin-top: 5px;
}

.bookmarks-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Yer imi listesindeki her bir satır */
.bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.bookmark-item:last-child {
  border-bottom: none;
}
.bookmark-item a {
  text-decoration: none;
  color: #333;
  flex-grow: 1;
}
.bookmark-item a:hover {
  color: #0073aa;
}

/* "Henüz yer iminiz yok" mesajı */
.no-bookmark {
  color: #777;
  text-align: center;
}

/* Yer imi silme butonu */
.delete-bookmark {
  background: none;
  border: none;
  color: #a00;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 5px;
  margin-right: 10px;
  opacity: 0.5;
}
.delete-bookmark:hover {
  opacity: 1;
  color: #f00;
}

/* İşaretlenmiş ayet numarasının stili */
.sure-goruntuleyici-ayet-numarasi {
  cursor: pointer; /* Tıklanabilir olduğunu belirtir */
  transition: color 0.2s;
}
.sure-goruntuleyici-ayet-numarasi.bookmarked {
  color: #D18E1A; /* İşaretlenmiş ayet rengi (altın sarısı) */
  font-weight: bold;
}
/* --- Yer İmi Açıklama ve Bildirim Stilleri --- */

/* "Yer İmlerim" butonu altındaki açıklama metni */
.bookmark-info {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  text-align: right;
}

/* Bildirim kutusunun genel stili */
.kuran-oku-notification {
  position: fixed; /* Ekranda sabit kalır */
  top: 20px;
  right: 50%;
  transform: translateX(-50%); /* Yatayda tam ortalar */
  padding: 12px 25px;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  z-index: 9999;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Başarı bildirimi (Yeşil) */
.kuran-oku-notification.success {
  background-color: #28a745;
}

/* Bilgi bildirimi (Mavi) */
.kuran-oku-notification.info {
  background-color: #17a2b8;
}