/**
 * Canlı site AJAX arama + detaylı filtre chrome (Next shell)
 */

/* —— Header arama kutusu —— */
.aml-header .ajax-search-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  z-index: 10050;
}
.aml-header .ajax-search-container .search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.45rem;
  background: var(--theme-neutral);
  border: 1px solid var(--theme-border);
  border-radius: 0.5rem;
  box-sizing: border-box;
  overflow: visible;
}
.aml-header .ajax-search-container .search-box:focus-within {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 18%, transparent);
  background: var(--theme-surface);
}
.aml-header .ajax-search-container .search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--theme-muted);
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
}
.aml-header .ajax-search-container .search-input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 0.85rem 0 2.35rem;
  color: var(--theme-text);
  font-size: 0.9rem;
  font-weight: 500;
}
.aml-header .ajax-search-container .search-input::placeholder {
  color: var(--theme-muted);
}
.aml-header .ajax-search-container .search-input {
  padding-right: 2.85rem;
}
.aml-header .ajax-search-container .filter-button {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--theme-text) 4%, transparent);
  border: none;
  border-left: 1px solid var(--theme-border);
  color: var(--theme-muted);
  text-decoration: none;
  z-index: 3;
  transition: background 0.15s, color 0.15s;
}
.aml-header .ajax-search-container .filter-button:hover {
  background: color-mix(in srgb, var(--theme-text) 10%, transparent);
  color: var(--theme-text);
}
.aml-header .ajax-search-container .ajax-search-loader {
  display: none;
  position: absolute;
  right: 2.7rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  color: var(--theme-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.aml-header .ajax-search-container .ajax-search-loader.is-visible {
  display: block;
}
.aml-header .ajax-search-container .search-box {
  overflow: hidden;
  height: 2.55rem;
}

/* —— AJAX dropdown —— */
.ajax-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(26rem, calc(100vw - 1.25rem));
  min-width: 18rem;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 0.4rem;
  box-shadow: var(--theme-panel-shadow);
  max-height: min(28rem, 70vh);
  overflow: hidden;
  z-index: 10060;
  flex-direction: column;
}
.ajax-search-dropdown.is-open {
  display: flex;
}
.ajax-search-list {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: min(24rem, 60vh);
  overscroll-behavior: contain;
}
.ajax-search-list::-webkit-scrollbar { width: 4px; }
.ajax-search-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--theme-text) 18%, transparent);
  border-radius: 999px;
}
.ajax-search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  color: var(--theme-text);
  border-bottom: 1px solid var(--theme-border);
  transition: background 0.12s ease;
}
.ajax-search-result-item:last-child { border-bottom: none; }
.ajax-search-result-item:hover,
.ajax-search-result-item.active {
  background: var(--theme-neutral);
  color: var(--theme-text);
}
.ajax-search-result-image {
  width: 2.625rem;
  height: 3.75rem;
  flex: 0 0 2.625rem;
  object-fit: cover;
  border-radius: 0.25rem;
  background: var(--theme-bg);
}
.ajax-search-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.ajax-search-result-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--theme-text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajax-search-result-title strong {
  color: var(--theme-info);
  font-weight: 800;
}
.ajax-search-result-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--theme-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajax-search-result-subtitle strong {
  color: var(--theme-info);
  font-weight: 700;
}
.ajax-search-result-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  color: var(--theme-muted);
  font-size: 0.68rem;
  font-weight: 550;
  overflow: hidden;
}
.ajax-search-age {
  display: inline-flex;
  padding: 0.05rem 0.28rem;
  border: 1px solid var(--theme-border);
  border-radius: 0.15rem;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--theme-muted);
}
.ajax-search-score {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--theme-muted);
}
.ajax-search-score i {
  font-size: 0.58rem;
  color: var(--theme-accent);
}
.ajax-search-type,
.ajax-search-year {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ajax-search-dot {
  color: var(--theme-border);
  font-weight: 700;
  user-select: none;
}
.ajax-search-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--theme-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.ajax-search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 0.85rem;
  background: var(--theme-accent);
  color: var(--theme-accent-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  transition: background 0.15s, filter 0.15s;
}
.ajax-search-view-all:hover {
  background: var(--theme-accent-deep);
  color: var(--theme-accent-ink);
}
.ajax-search-view-all i { font-size: 0.65rem; }

/* —— Filtre bar (canlı) —— */
.filter-page-title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--theme-text);
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.02em;
}
.filter-page-title i {
  color: var(--theme-muted);
  font-size: 1em;
}
.filter-page-wrap {
  width: var(--aml-max) !important;
  max-width: var(--aml-max) !important;
  margin-inline: auto;
  padding-inline: var(--hp-pad);
  box-sizing: border-box;
}
.filter-results {
  margin-top: 0.35rem;
}
.filter-results-count {
  color: var(--theme-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.filter-form-anix { margin-bottom: 0.85rem; }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  padding: 0.45rem 0.55rem;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 0.5rem;
}
.filter-bar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 9rem;
  flex: 1 1 10rem;
  max-width: 14rem;
}
.filter-bar-search i {
  position: absolute;
  left: 0.65rem;
  color: var(--theme-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.filter-bar-search input {
  width: 100%;
  padding: 0.4rem 0.7rem 0.4rem 1.9rem;
  background: var(--theme-neutral);
  border: 1px solid var(--theme-border);
  border-radius: 0.35rem;
  color: var(--theme-text);
  font-size: 0.8rem;
  font-weight: 500;
  min-height: 2rem;
  line-height: 1.2;
  appearance: none;
}
.filter-bar-search input::placeholder { color: var(--theme-muted); }
.filter-bar-search input:focus {
  outline: none;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 18%, transparent);
  background: var(--theme-surface);
}
.filter-dropdown-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.3rem;
}
.filter-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  background: var(--theme-neutral);
  border: 1px solid var(--theme-border);
  border-radius: 0.35rem;
  color: var(--theme-text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  min-height: 2rem;
}
.filter-dd-btn:hover {
  background: color-mix(in srgb, var(--theme-text) 8%, var(--theme-neutral));
  border-color: var(--theme-border);
  color: var(--theme-text);
}
.filter-dd-btn[aria-expanded="true"] {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--theme-accent-ink);
}
.filter-dd-btn[aria-expanded="true"] i.la-chevron-down { transform: rotate(180deg); }
.filter-dd-btn i.la-chevron-down {
  font-size: 0.65rem;
  transition: transform 0.15s;
}
.filter-dd-label { white-space: nowrap; }
.filter-dd-count {
  font-style: normal;
  opacity: 0.85;
  font-size: 0.85em;
}
.filter-bar-actions {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
  align-items: center;
}
.filter-btn-submit {
  padding: 0.35rem 0.75rem;
  background: var(--theme-accent);
  border: 1px solid var(--theme-accent);
  border-radius: 0.35rem;
  color: var(--theme-accent-ink);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  transition: background 0.15s, border-color 0.15s;
}
.filter-btn-submit:hover {
  background: var(--theme-accent-deep);
  border-color: var(--theme-accent-deep);
}
.filter-btn-reset {
  padding: 0.35rem 0.65rem;
  background: transparent;
  border: 1px solid var(--theme-border);
  border-radius: 0.35rem;
  color: var(--theme-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
}
.filter-btn-reset:hover {
  background: var(--theme-neutral);
  color: var(--theme-text);
}
.filter-panels { position: relative; margin-top: 0.35rem; }
.filter-panel {
  display: none;
  padding: 0.55rem 0.65rem;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 0.45rem;
  box-shadow: var(--theme-panel-shadow);
  max-height: min(42vh, 360px);
  overflow: auto;
}
.filter-panel.is-open { display: block; }
.filter-panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.4rem;
}
.filter-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--theme-text);
  white-space: nowrap;
}
.filter-check-row:hover { background: var(--theme-neutral); }
.filter-check-row input {
  accent-color: var(--theme-accent);
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
}
.filter-panel-year {
  display: grid !important;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.15rem 0.35rem;
}
.filter-panel-genre {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.15rem 0.35rem;
}
.filter-check-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--theme-text);
}
.filter-check-item:hover { color: var(--theme-accent); }
.filter-check-item input {
  accent-color: var(--theme-accent);
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  flex-shrink: 0;
}
.filter-empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--theme-neutral);
  border-radius: 0.5rem;
  border: 1px dashed var(--theme-border);
}
.filter-empty i {
  font-size: 2.5rem;
  color: var(--theme-muted);
  display: block;
  margin-bottom: 0.75rem;
}
.filter-empty h3 {
  color: var(--theme-text);
  margin: 0 0 0.4rem;
  font-weight: 650;
  font-size: 1.05rem;
}
.filter-empty p {
  color: var(--theme-muted);
  font-size: 0.85rem;
  margin: 0;
}
@media (max-width: 900px) {
  .filter-panel-year { grid-template-columns: repeat(8, 1fr) !important; }
  .filter-panel-genre { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 500px) {
  .filter-panel-year { grid-template-columns: repeat(5, 1fr) !important; }
  .filter-panel-genre { grid-template-columns: repeat(2, 1fr); }
  .filter-bar-actions { margin-left: 0; width: 100%; }
  .filter-bar-search { max-width: none; flex: 1 1 100%; }
}
@media (max-width: 768px) {
  .ajax-search-dropdown {
    position: fixed;
    top: 4.25rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    min-width: 0;
  }
}
