/* ==========================================================================
 * Fethiyede.com — T4639-G02 & T4639-G03: Yemek Kabuğu + Yemek Tarifleri Asistanı
 * Kural: 0-silme, tek kaynak Fethiyede paleti (#FAF5EC / #702D3B / #102A43),
 * 1280/1920 reklam kulakları orta sütunu itmez (0 kayma), 390 yatay taşma 0.
 * ========================================================================== */

:root {
  --fd-yemek-bg: #FAF5EC;
  --fd-yemek-surface: #FFFDF9;
  --fd-yemek-bord: rgba(112, 45, 59, 0.20);
  --fd-yemek-bordo: #702D3B;
  --fd-yemek-bordo-hover: #58212D;
  --fd-yemek-ink: #221A14;
  --fd-yemek-muted: #594E45;
  --fd-yemek-navy: #102A43;
}

html[data-theme="dark"],
body.dark-mode,
body.theme-dark {
  --fd-yemek-bg: #0F172A;
  --fd-yemek-surface: #1E293B;
  --fd-yemek-bord: rgba(148, 163, 184, 0.26);
  --fd-yemek-bordo: #FB7185;
  --fd-yemek-bordo-hover: #F43F5E;
  --fd-yemek-ink: #F8FAFC;
  --fd-yemek-muted: #CBD5E1;
  --fd-yemek-navy: #E2E8F0;
}

/* G02-1: Üst kabuk (topbar, header+nav#mainNav, section.ticker, #fzTicker, visitor-local-bar)
   tam genişlikte ve tüm tarif kuyruklarının ÜSTÜNDE kalır */
#fd-yemek-top-shell {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  clear: both;
  background: var(--fd-yemek-surface);
}

#fd-yemek-top-shell .topbar {
  background: #102A43;
  color: #F8FAFC;
  font-size: 0.82rem;
  padding: 6px 0;
}
#fd-yemek-top-shell .topbar .container,
#fd-yemek-top-shell .header__main,
#fd-yemek-top-shell .ticker__inner,
#fd-yemek-top-shell .fz-markets-inner,
#fd-yemek-top-shell .visitor-local-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 14px;
  box-sizing: border-box;
}
#fd-yemek-top-shell .topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
#fd-yemek-top-shell .topbar .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
}

#fd-yemek-top-shell header.site-header {
  background: var(--fd-yemek-surface);
  border-bottom: 1px solid var(--fd-yemek-bord);
}
#fd-yemek-top-shell .header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
  flex-wrap: wrap;
}
#fd-yemek-top-shell nav#mainNav,
nav#mainNav.fd-yemek-mainnav {
  background: #702D3B;
  color: #FAF5EC;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
nav#mainNav.fd-yemek-mainnav .fd-mainnav-list {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}
nav#mainNav.fd-yemek-mainnav .fd-mainnav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  color: #FAF5EC;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}
nav#mainNav.fd-yemek-mainnav .fd-mainnav-list a.is-active,
nav#mainNav.fd-yemek-mainnav .fd-mainnav-list a:hover {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

/* SON DAKİKA bandı (section.ticker) ve Piyasa bandı (#fzTicker) + visitor-local-bar */
#fd-yemek-top-shell section.ticker {
  background: #8B1E2F;
  color: #FFFDF9;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
#fd-yemek-top-shell .ticker__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
#fd-yemek-top-shell .ticker__label {
  background: #FFFDF9;
  color: #8B1E2F;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
#fd-yemek-top-shell .ticker__track {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
#fd-yemek-top-shell .ticker__track a {
  color: #FFFDF9;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

#fzTicker.fd-fz-ticker-fallback,
#fd-yemek-top-shell #fzTicker {
  background: #F4EFE6;
  color: #221A14;
  border-bottom: 1px solid rgba(112, 45, 59, 0.14);
  padding: 6px 0;
  font-size: 0.82rem;
}
#fd-yemek-top-shell .fz-markets-inner,
#fd-yemek-top-shell .visitor-local-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#fd-yemek-top-shell .visitor-local-bar {
  background: #FAF5EC;
  color: #3B3026;
  border-bottom: 1px solid rgba(112, 45, 59, 0.16);
  padding: 6px 0;
  font-size: 0.82rem;
}

/* G02-2: kyt-ust ikincil şerit olarak kalır; "Son eklenen" tarif kuyruğu bantların ALTINDA akar */
.kyt-ust,
header.kyt-ust,
div.kyt-ust {
  position: relative !important;
  top: auto !important;
  z-index: 12 !important;
  background: var(--fd-yemek-bg) !important;
  border-bottom: 1px solid var(--fd-yemek-bord) !important;
  padding: 8px 14px !important;
  margin: 0 auto 12px auto !important;
  max-width: 1240px !important;
  border-radius: 0 0 12px 12px;
  box-shadow: none !important;
  font-size: 0.88rem;
}

.son-eklenen-kuyruk,
.tarif-son-eklenen,
.tm-son-eklenen,
[data-tarif-son-eklenen],
.kyt-son-eklenen {
  position: relative !important;
  top: auto !important;
  z-index: 5 !important;
  margin-top: 8px !important;
  clear: both;
}

/* G02-3: Reklam kulakları orta sütunu ASLA itmesin (1280/1920 kayma = 0, 390 taşma = 0) */
body.fd-yemek-shell-active {
  overflow-x: hidden;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

body.fd-yemek-shell-active main,
body.fd-yemek-shell-active .tm-kapsayici,
body.fd-yemek-shell-active .tarif-merkezi-wrap,
body.fd-yemek-shell-active .tm-container {
  max-width: 1240px;
  width: 100%;
  margin-inline: auto !important;
  padding-inline: 14px;
  box-sizing: border-box;
  float: none !important;
}

.reklam-kulak,
.kulak-reklam,
.site-ad-ear,
.ad-ear,
.ad-ear-left,
.ad-ear-right,
.fz-ad-ear,
[class*="reklam-kulak"],
[class*="ad-ear"],
[id*="reklam-kulak"] {
  position: fixed !important;
  top: 168px !important;
  width: 140px !important;
  max-width: 140px !important;
  margin: 0 !important;
  float: none !important;
  flex: 0 0 0 !important;
  z-index: 18 !important;
}
.reklam-kulak--sol,
.ad-ear-left,
[class*="kulak-sol"],
[class*="ear-left"] {
  left: max(8px, calc(50vw - 775px)) !important;
}
.reklam-kulak--sag,
.ad-ear-right,
[class*="kulak-sag"],
[class*="ear-right"] {
  right: max(8px, calc(50vw - 775px)) !important;
}
@media (max-width: 1580px) {
  .reklam-kulak,
  .kulak-reklam,
  .site-ad-ear,
  .ad-ear,
  .ad-ear-left,
  .ad-ear-right,
  .fz-ad-ear,
  [class*="reklam-kulak"],
  [class*="ad-ear"],
  [id*="reklam-kulak"] {
    display: none !important;
  }
}

/* G02-4: Alt kabuk — site-haberler-bar + footer#site-footer + nav.fz-tabbar */
#fd-yemek-bottom-shell .site-haberler-bar {
  background: #102A43;
  color: #F8FAFC;
  padding: 10px 14px;
  border-top: 2px solid #702D3B;
  font-size: 0.85rem;
}
#fd-yemek-bottom-shell .site-haberler-bar__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#fd-yemek-bottom-shell .site-haberler-bar a {
  color: #FDE68A;
  text-decoration: none;
  font-weight: 600;
}
#fd-yemek-bottom-shell footer#site-footer {
  background: #1B1613;
  color: #EDE6DC;
  padding: 28px 14px calc(76px + env(safe-area-inset-bottom, 0px));
}
#fd-yemek-bottom-shell .fd-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
#fd-yemek-bottom-shell footer#site-footer a {
  color: #FAF5EC;
  text-decoration: none;
}

nav.fz-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #FFFDF9;
  border-top: 1px solid rgba(112, 45, 59, 0.22);
  display: none;
  align-items: center;
  justify-content: space-around;
  z-index: 80;
  box-shadow: 0 -4px 16px rgba(16, 42, 67, 0.08);
}
nav.fz-tabbar a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 44px;
  color: #221A14;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 2px;
}
nav.fz-tabbar a.is-active {
  color: #702D3B;
}
@media (max-width: 900px) {
  nav.fz-tabbar {
    display: flex;
  }
}

/* ==========================================================================
 * T4639-G03: Yemek Tarifleri Asistanı (.tm-asistan) — Tel Kafes Onarımı
 * Gerçek vektörel şef/tarif ikonu (🤖 emojisiz), hizalı form/düğme/cevap.
 * api/yemek-asistani-2400.php davranışı kesinlikle korunur.
 * ========================================================================== */
.tm-asistan,
section.tm-asistan,
div.tm-asistan {
  background: linear-gradient(180deg, var(--fd-yemek-surface) 0%, var(--fd-yemek-bg) 100%) !important;
  border: 1px solid var(--fd-yemek-bord) !important;
  border-top: 4px solid var(--fd-yemek-bordo) !important;
  border-radius: 16px !important;
  padding: clamp(16px, 2.5vw, 24px) !important;
  margin: 18px 0 !important;
  box-shadow: 0 10px 26px rgba(34, 26, 20, 0.06) !important;
  color: var(--fd-yemek-ink) !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.tm-asistan h2,
.tm-asistan h3,
.tm-asistan .tm-asistan-baslik,
.tm-asistan__title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 10px 0 !important;
  font-size: clamp(1.08rem, 2.2vw, 1.32rem) !important;
  font-weight: 800 !important;
  color: var(--fd-yemek-ink) !important;
  line-height: 1.3 !important;
}

/* Gerçek SVG İkon Rozeti (🤖 emojisine sıfır bağımlılık) */
.tm-asistan h2::before,
.tm-asistan h3::before,
.tm-asistan .tm-asistan-baslik::before {
  content: "";
  display: inline-block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background-color: #702D3B;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF5EC' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 13.87A4 4 0 0 1 7.41 6a5.11 5.11 0 0 1 9.18 0A4 4 0 0 1 18 13.87V20H6Z'/%3E%3Cline x1='6' y1='17' x2='18' y2='17'/%3E%3Cpath d='M9 11v2M12 10v3M15 11v2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  box-shadow: 0 4px 10px rgba(112, 45, 59, 0.22);
}

.tm-asistan .fd-tm-emoji-hidden {
  display: none !important;
}

.tm-asistan p,
.tm-asistan .tm-asistan-aciklama {
  margin: 0 0 14px 0 !important;
  color: var(--fd-yemek-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
}

/* Form, Girdi ve Gönder Düğmesi Hizalaması */
.tm-asistan form,
.tm-asistan .tm-asistan-form,
.tm-asistan .tm-form-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
}

.tm-asistan input[type="text"],
.tm-asistan input[type="search"],
.tm-asistan textarea,
.tm-asistan select {
  width: 100% !important;
  min-height: 46px !important;
  padding: 10px 14px !important;
  border: 1.5px solid rgba(112, 45, 59, 0.28) !important;
  border-radius: 12px !important;
  background: var(--fd-yemek-surface) !important;
  color: var(--fd-yemek-ink) !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.tm-asistan textarea {
  grid-column: 1 / -1 !important;
  min-height: 76px !important;
  resize: vertical;
}

.tm-asistan input::placeholder,
.tm-asistan textarea::placeholder {
  color: #594E45 !important;
  opacity: 1 !important;
}

.tm-asistan input:focus,
.tm-asistan textarea:focus {
  border-color: #702D3B !important;
  box-shadow: 0 0 0 3px rgba(112, 45, 59, 0.16) !important;
}

.tm-asistan button,
.tm-asistan input[type="submit"],
.tm-asistan .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 46px !important;
  padding: 0 20px !important;
  border: none !important;
  border-radius: 12px !important;
  background: #702D3B !important;
  color: #FAF5EC !important;
  font-weight: 700 !important;
  font-size: 0.94rem !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background-color 0.15s ease, transform 0.1s ease !important;
}

.tm-asistan button:hover,
.tm-asistan input[type="submit"]:hover {
  background: #58212D !important;
}

/* Cevap Alanı Hizalaması */
.tm-asistan .tm-asistan-cevap,
.tm-asistan .tm-cevap,
.tm-asistan .asistan-sonuc,
.tm-asistan [id*="asistan"][id*="cevap"],
.tm-asistan [id*="asistan"][id*="sonuc"],
.tm-asistan [data-asistan-cevap],
.tm-asistan output {
  grid-column: 1 / -1 !important;
  display: block;
  margin-top: 14px !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  background: var(--fd-yemek-surface) !important;
  border: 1px solid rgba(112, 45, 59, 0.18) !important;
  color: var(--fd-yemek-ink) !important;
  font-size: 0.93rem !important;
  line-height: 1.6 !important;
  min-height: 48px;
  overflow-wrap: anywhere;
}

.tm-asistan .tm-asistan-cevap:empty,
.tm-asistan .tm-cevap:empty {
  display: none;
}

@media (max-width: 640px) {
  .tm-asistan form,
  .tm-asistan .tm-asistan-form,
  .tm-asistan .tm-form-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .tm-asistan button,
  .tm-asistan input[type="submit"] {
    width: 100% !important;
  }
  #fd-yemek-top-shell .header__main .search {
    order: 3;
    width: 100%;
    display: flex;
    gap: 6px;
  }
  #fd-yemek-top-shell .header__main .search input {
    flex: 1;
    min-width: 0;
  }
}
