/* ============================================================
   DOSYA SORUMLULUGU — features-16-modal.css
   ------------------------------------------------------------
   NE YAPAR   : Genel modal kabugu, sekmeler ve AI sonuc kutusu.
   KAYNAK     : v3.12.0'da bolundu — kurallar birebir tasindi,
                hicbir kural yeniden yazilmadi veya siralanmadi.
   SIRA       : index.html'deki <link> sirasi kaskadi belirler.
                Bu dosyanin sirasini DEGISTIRME.
   ------------------------------------------------------------
   Tam dosya listesi ve sira: BAGIMLILIK-HARITASI.md
   ============================================================ */

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: sheetUp 0.32s cubic-bezier(0.32,0.72,0,1);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
}
.modal-sheet::-webkit-scrollbar { display: none; }
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(30px); }
  to   { opacity:1; transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border2);
  border-radius: 99px;
  margin: 10px auto 0;
}
.modal-header {
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--text); flex: 1; letter-spacing: -0.3px; }
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text3);
  transition: transform 0.12s, background 0.12s;
}
.modal-close:active { transform: scale(0.88); background: var(--bg4); }

.modal-tabs {
  display: flex;
  padding: 12px 14px 0;
  gap: 6px;
  margin-bottom: 14px;
}
.modal-tab {
  flex: 1;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--bg3);
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
  border: 1.5px solid transparent;
}
.modal-tab.active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(232,93,0,0.3);
}
.modal-tab-content { display: none; padding: 0 14px; }
.modal-tab-content.active { display: block; }

/* meal selector */
.meal-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.meal-btn {
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1.5px solid transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s, transform 0.1s;
  cursor: pointer;
}
.meal-btn:active { transform: scale(0.95); }
.meal-btn .meal-icon { font-size: 16px; }
.meal-btn.active {
  background: var(--orange-light);
  border-color: var(--orange-border);
  color: var(--orange);
}

/* AI result box */
.ai-result-box {
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}
.ai-result-name { font-size: 14px; font-weight: 700; color: var(--orange); margin-bottom: 6px; }
.ai-result-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}
.ai-result-item { text-align: center; }
.ai-result-val { font-size: 16px; font-weight: 700; color: var(--text); }
.ai-result-lbl { font-size: 10px; color: var(--text3); }

