/* Ortak akıllı arama bileşeni. Sınıflar aa- önekiyle sayfa stillerinden ayrılır. */
.aa-kok {
  --aa-ink: #0A0D16;
  --aa-gold: #C6A046;
  --aa-soft: #F6F7F9;
  --aa-white: #FFFFFF;
  --aa-muted: #5B6170;
  --aa-line: rgba(10, 13, 22, 0.08);
  position: relative;
}

.aa-kok .field-body { position: relative; }

.aa-kok input[data-akilli-arama-hazir] { padding-right: 34px; }
.aa-kok input[data-akilli-arama-hazir]::-webkit-search-cancel-button { display: none; }

.aa-temizle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--aa-soft);
  color: var(--aa-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color .15s ease;
}

.aa-temizle[hidden] { display: none; }
.aa-temizle:hover { background: #ECEEF2; }
.aa-temizle:focus-visible { outline: 2px solid var(--aa-gold); outline-offset: 2px; }

.aa-temizle-ikon,
.aa-temizle-ikon::after {
  display: block;
  width: 12px;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(45deg);
}

.aa-temizle-ikon::after { content: ""; transform: rotate(90deg); }

.aa-secim {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 8px;
  min-width: 0;
}

.aa-secim[hidden] { display: none; }

.aa-secim-tur {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b5420;
  background: rgba(198, 160, 70, .16);
  border-radius: 999px;
  padding: 2px 8px;
}

.aa-secim-ad {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.aa-secim-detay {
  flex: none;
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aa-secim-detay[hidden] { display: none; }

.aa-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--aa-white);
  color: var(--aa-ink);
  border: 1px solid var(--aa-line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(10, 13, 22, 0.14), 0 2px 6px rgba(10, 13, 22, 0.05);
  padding: 8px;
  z-index: 30;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}

.aa-panel[hidden] { display: none; }

.aa-panel[data-durum="yukleniyor"]::before {
  content: "";
  position: sticky;
  top: -8px;
  display: block;
  height: 2px;
  margin: -8px -8px 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--aa-gold) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: aa-akis 1s linear infinite;
}

@keyframes aa-akis {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.aa-grup + .aa-grup {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--aa-line);
}

.aa-grup-baslik {
  padding: 8px 12px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-secenek {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  scroll-margin: 8px;
}

.aa-secenek.is-etkin {
  background: var(--aa-soft);
  box-shadow: inset 3px 0 0 var(--aa-gold);
}

.aa-ikon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--aa-soft);
  color: var(--aa-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
}

.aa-secenek.is-etkin .aa-ikon { background: var(--aa-ink); color: var(--aa-gold); }

.aa-govde { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.aa-ana {
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--aa-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aa-vurgu {
  background: transparent;
  color: inherit;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(198, 160, 70, 0.55);
  padding: 0;
}

.aa-alt {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--aa-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aa-durum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.aa-durum[hidden] { display: none; }

.aa-durum-yazi {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--aa-muted);
}

.aa-yeniden {
  flex: 0 0 auto;
  border: 1px solid var(--aa-ink);
  background: var(--aa-ink);
  color: var(--aa-white);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.aa-yeniden[hidden] { display: none; }
.aa-yeniden:hover { background: #1A1F2E; }
.aa-yeniden:focus-visible { outline: 2px solid var(--aa-gold); outline-offset: 2px; }

.aa-duyuru {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.aa-kok input[data-akilli-arama-hazir]:focus,
.aa-kok input[data-akilli-arama-hazir]:focus-visible { outline: none; }

@media (max-width: 991.98px) {
  .aa-panel {
    left: 0;
    right: 0;
    width: auto;
    top: calc(100% + 6px);
    border-radius: 18px;
    max-height: min(60vh, 440px);
  }

  .aa-secenek { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .aa-panel[data-durum="yukleniyor"]::before { animation: none; background: var(--aa-gold); opacity: .5; }
}

html[data-theme="dark"] .aa-kok {
  --aa-line: rgba(255, 255, 255, 0.1);
  --aa-muted: #A3AAB8;
}

html[data-theme="dark"] .aa-panel { background: #0F1420; color: #F6F7F9; border-color: var(--aa-line); }
html[data-theme="dark"] .aa-secim-tur { color: #E6D3A1; background: rgba(198, 160, 70, .22); }
html[data-theme="dark"] .aa-secim-ad,
html[data-theme="dark"] .aa-secim-detay { color: #F6F7F9; }
html[data-theme="dark"] .aa-ana { color: #F6F7F9; }
html[data-theme="dark"] .aa-secenek.is-etkin { background: #1A2130; }
html[data-theme="dark"] .aa-ikon,
html[data-theme="dark"] .aa-temizle { background: #1A2130; color: #F6F7F9; }
html[data-theme="dark"] .aa-yeniden { background: var(--aa-gold); border-color: var(--aa-gold); color: var(--aa-ink); }
