/* public/css/meal-oku.css */

/* Arapça font */
@font-face {
  font-family: "MyArabic";
  src: url("/fonts/KuranKerimFontHamdullah.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Sayfa genel fontu */
.meal-oku-page {
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

/* Sayfa başlığı */
.meal-oku-page .meal-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.4px;
}

/* Kart */
.meal-oku-page .card-box {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Üst bilgi */
.meal-oku-page .meta {
  font-size: 16px;
  font-weight: 600;
  color: #444;
  letter-spacing: 0.35px;
  margin-bottom: 10px;
}

.meal-oku-page .sure-no,
.meal-oku-page .ayah-no {
  color: #6b7280;
  font-weight: 600;
}

.meal-oku-page .sure-name {
  color: #222;
  font-weight: 700;
}

.meal-oku-page .arabic-sure {
  font-family: "MyArabic", serif;
  font-size: 1.15em;
  color: #555;
  margin-left: 6px;
}

/* Arapça ayet */
.meal-oku-page .arabic {
  font-family: "MyArabic", "Amiri", serif;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  word-break: break-word;
  word-spacing: 0;
}

/* Arapça kelimeler */
.meal-oku-page .arabic-word {
  display: inline;
  margin-left: 2px;
  cursor: pointer;
  transition: color 0.08s ease;
}

.meal-oku-page .arabic-word:hover {
  color: #dc2626;
}

/* Meal Oku popup trigger */
.meal-oku-page .arabic-word.root-popup-trigger {
  padding: 1px 1px;
}

.arabic-word.root-popup-trigger:hover {
  background: transparent !important;
  border-radius: 0 !important;
  color: #dc2626 !important;
}

/* İrab popup trigger */
.meal-oku-page .arabic-word.irab-popup-trigger {
  padding: 1px 1px;
}

.arabic-word.irab-popup-trigger:hover {
  background: transparent !important;
  border-radius: 0 !important;
  color: #dc2626 !important;
}

/* Meal kartı */
.meal-oku-page .meal-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 10px;
}

.meal-oku-page .meal-card-body {
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.85;
  text-align: left;
}

/* Popup genel */
.root-popup {
  position: fixed;
  z-index: 100002;
  min-width: 120px;
  max-width: 180px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  padding: 8px 10px;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.root-popup.d-none {
  display: none;
}

/* Popup iç loading / boş durum */
.root-popup-loading,
.root-popup-empty {
  text-align: center;
  padding: 10px;
  color: #666;
  font-size: 14px;
}

/* Kök seçenek linkleri */
.root-option-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 8px;
}

.root-option-link:last-child {
  margin-bottom: 0;
}

/* Kök seçenek butonları */
.root-option-btn {
  display: block;
  width: 100%;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  font-family: "MyArabic", "Amiri", serif;
  font-size: 34px;
  line-height: 1.4;
  color: #222;
  transition: background 0.15s ease;
}

.root-option-btn:hover {
  background: #e9ecef;
}

/* Popup açıklama / irab alanı */
.root-popup-irab {
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 17px;
  line-height: 1.45;
  color: #444;
  direction: ltr;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  font-weight: 500;
}

/* İrab sayfası - Ayet kartı */
.irab-ayet-text {
  font-family: "MyArabic", "Amiri", serif;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  color: #111;
  word-break: break-word;
  word-spacing: 0;
}

/* İrab sayfası - Meal kartı */
.irab-meal-text {
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: clamp(16px, 1.2vw, 20px);
  line-height: 1.9;
  color: #222;
  text-align: left;
}

/* İrab kartı genel görünüm */
.irab-content {
  direction: rtl;
  text-align: right;
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 2.15;
  color: #111;
  word-break: break-word;
  padding-top: 4px;
}

/* JSON'dan gelen bloklar */
.irab-content p {
  margin: 0 0 14px 0;
}

/* Vurgulu kısımlar */
.irab-content .hlt {
  color: #00c853;
  font-weight: 500;
  font-size: 1.08em;
}

/* İçteki Kur'an font spanları */
.irab-content .qpc-hafs {
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
}

/* Satır araları */
.irab-content br {
  line-height: 2.1;
}

/* İrab kart başlıkları */
.irab-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 10px;
}

/* Mobil uyum */
@media (max-width: 768px) {
  .irab-ayet-text {
    font-size: 30px;
    line-height: 1.8;
  }

  .irab-meal-text {
    font-size: 16px;
    line-height: 1.8;
  }

  .irab-content {
    font-size: 24px;
    line-height: 2;
  }

  .irab-content p {
    margin-bottom: 12px;
  }

  .root-popup {
    min-width: 180px;
    max-width: 260px;
    padding: 10px;
  }

  .root-option-btn {
    font-size: 28px;
    padding: 12px 10px;
  }

  .root-popup-irab {
    font-size: 15px;
  }
}

.mutashabih-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:20px;
    height:20px;
    font-size:12px;
    border:1px solid #999;
    border-radius:4px;
    color:#444;
    text-decoration:none;
    line-height:1;
}

.mutashabih-btn:hover{
    background:#f3f3f3;
    color:#000;
    text-decoration:none;
}

.mutashabih-link{
    text-decoration:none;
}

/* ===============================
   Müteşabih butonu (=)
================================ */

.mutashabih-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:24px;
    height:24px;

    border-radius:7px;

    background:#a855f7;
    border:1px solid #9333ea;
    color:#fff;

    font-size:15px;
    font-weight:700;

    box-shadow:0 2px 6px rgba(0,0,0,.15);

    transition:all .15s ease;
}

.mutashabih-badge:hover{
    background:#9333ea;
}


/* ===============================
   Benzer ayet butonu (≈)
================================ */

.similar-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:24px;
    height:24px;

    border-radius:7px;

    background:#3b82f6;
    border:1px solid #2563eb;
    color:#fff;

    font-size:15px;
    font-weight:700;

    text-decoration:none;

    box-shadow:0 2px 6px rgba(0,0,0,.15);

    transition:all .15s ease;
}

.similar-btn:hover{
    background:#2563eb;
}

.tafsir-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:26px;
    padding:0 10px;
    margin-left:6px;
    border-radius:8px;
    background:#f59e0b;
    border:1px solid #d97706;
    color:#fff;
    font-size:13px;
    font-weight:700;
    text-decoration:none;
    line-height:1;
    box-shadow:0 2px 6px rgba(0,0,0,.15);
    transition:all .15s ease;
    white-space:nowrap;
}

.tafsir-btn:hover{
    background:#d97706;
    color:#fff;
    text-decoration:none;
}

/* Sure seçimi combobox (ayet liste ile aynı davranış; açık listede harf ile sıralı arama) */
.meal-oku-page .meal-sure-combobox-wrap .meal-sure-combobox-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    max-height: min(320px, 55vh);
    overflow-y: auto;
    z-index: 1060;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.meal-oku-page .meal-sure-combobox-btn {
    cursor: pointer;
}

.meal-oku-page .meal-sure-combobox-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    color: inherit;
}

.meal-oku-page .meal-sure-combobox-item:last-child {
    border-bottom: 0;
}

.meal-oku-page .meal-sure-combobox-item:hover,
.meal-oku-page .meal-sure-combobox-item.is-active {
    background: #e7f1ff;
}

.meal-oku-page .meal-sure-combobox-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}
