/* public/css/meal-liste.css */

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

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

/* Arapça metin */
.meal-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: 0px;
}

/* Türkçe meal */
.meal-page .turkish {
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.8;
}

/*
 * Sadece Ayet Liste: sayfa + Önceki/Sonraki.
 * Grid satırındaki form-select / form-control ile aynı yükseklik; kalan genişlik butonlara bölünür.
 */
.meal-page .meal-filters-row-nav > .meal-sayfa-nav-col {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.meal-page .meal-sayfa-nav-col > .meal-sayfa-nav-row {
  flex: 1 1 auto;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  flex-wrap: nowrap;
  align-items: stretch;
}

.meal-page .meal-sayfa-input {
  flex: 0 0 auto;
  width: 5.25rem;
  min-width: 4.5rem;
  max-width: 6rem;
  align-self: stretch;
  min-height: calc(1.5em + 0.75rem + 2px);
  height: 100%;
  box-sizing: border-box;
}

/* form-select ile aynı satır yüksekliği (Bootstrap 5) */
.meal-page .meal-filters-row-nav .form-select,
.meal-page .meal-filters-row-nav .form-control:not(.meal-sayfa-input) {
  min-height: calc(1.5em + 0.75rem + 2px);
}

.meal-page .meal-sayfa-nav-btn.btn-liste-nav {
  --liste-nav-bg: #f1f5f9;
  --liste-nav-border: #cbd5e1;
  --liste-nav-color: #334155;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 5.5rem;
  align-self: stretch;
  height: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.5rem 0.75rem !important;
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.5 !important;
  border-radius: 0.375rem;
  border: 1px solid var(--liste-nav-border) !important;
  background: var(--liste-nav-bg) !important;
  color: var(--liste-nav-color) !important;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.meal-page a.meal-sayfa-nav-btn.btn-liste-nav:hover {
  text-decoration: none;
}

.meal-page .meal-sayfa-nav-btn.btn-liste-nav:hover:not(:disabled) {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.meal-page .meal-sayfa-nav-btn.btn-liste-nav:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(100, 116, 139, 0.35);
  outline: 0;
}

.meal-page .meal-sayfa-nav-btn.btn-liste-nav:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

/* Telefon ve dar tablet: satır kırılır, taşma olmaz */
@media (max-width: 767.98px) {
  .meal-page .meal-sayfa-nav-col > .meal-sayfa-nav-row {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .meal-page .meal-sayfa-input {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .meal-page .meal-sayfa-nav-btn.btn-liste-nav {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: min(100%, 8.5rem);
  }
}

/* Ayet kartı */
.meal-page .ayah-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Üst bilgi */
.meal-page .meta{
  font-size: clamp(16px, 1vw, 19px);
  font-weight: 600;
  color: #444;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

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

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

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

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

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

/* Başlık */
.meal-title{
  text-align:center;
  font-size:28px;
  font-weight:700;
  margin-bottom:24px;
  letter-spacing:0.5px;
}

.meal-page .meal-filters {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

/* Besmele */
.meal-page .bismillah-card{
  padding-top:18px !important;
  padding-bottom:18px !important;
}

.meal-page .bismillah-text{
  font-family:"MyArabic", serif;
  text-align:center;
  color:#b91c1c;
  font-size:clamp(26px,4vw,36px);
  font-weight:500;
  line-height:2.0;
}

/* Link */
.meal-page .meta-link{
  display:inline-block;
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}

.meal-page .meta-link:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}

/* Kök vurgusu */
.root-highlight{
  color:#b91c1c;
  font-weight:700;
}

.meal-page .arabic-word.root-highlight{
  color:#dc2626;
  font-weight:400;
  text-decoration:none;
}

/* Popup trigger */
.arabic-word.root-popup-trigger{
  cursor:pointer;
  padding:1px 1px;
}

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

/* Popup */
.root-popup{
  position:fixed;
  z-index:100002;
  min-width:160px;
  max-width:240px;
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,0.12);
  padding:10px;
  font-family:"MyArabic","Amiri",serif;
  direction:rtl;
}

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

.root-popup-title{
  font-family:"MyArabic","Amiri",serif;
  font-size:22px;
  margin-bottom:8px;
  text-align:center;
  border-bottom:1px solid #eee;
  padding-bottom:6px;
}

.root-option-btn{
  display:block;
  width:100%;
  border:0;
  background:#f8f9fa;
  border-radius:8px;
  padding:10px 12px;
  margin-bottom:6px;
  text-align:center;
  cursor:pointer;
  font-family:"MyArabic","Amiri",serif;
  font-size:26px;
  line-height:1.6;
  font-weight:600;
}

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

.root-popup-loading,
.root-popup-empty{
  text-align:center;
  padding:8px;
  color:#666;
}

.root-option-link{
  text-decoration:none;
  color:inherit;
}

.root-option-link:hover{
  text-decoration:none;
  color:inherit;
}

.root-popup-irab {
    box-sizing: border-box;
    max-width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    direction: ltr;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.search-hit{
    color:#d40000 !important;;
    font-weight:700;
    background:rgba(255,0,0,0.08);
    border-radius:4px;
    padding:1px 3px;
}

.search-hit{
    color:#dc2626 !important;
    font-weight:700;
}

.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: native select yerine combobox (açık listede harf ile sıralı arama) */
.meal-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-page .meal-sure-combobox-btn {
    cursor: pointer;
}

.meal-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-page .meal-sure-combobox-item:last-child {
    border-bottom: 0;
}

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

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


