.mg-theme-dark {
  --mg-border: #3a3a3d;
  --mg-text: #f4f4f4;
  --mg-muted: #adadb3;
  --mg-control-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  background: #1f1f20;
  color: #f4f4f4;
}

.mg-theme-dark .mg-category-nav {
  color: #f4f4f4;
}

.mg-theme-dark .mg-header,
.mg-theme-dark .mg-search-panel,
.mg-theme-dark .mg-place-card,
.mg-theme-dark .mg-search input,
.mg-theme-dark .mg-language,
.mg-theme-dark .mg-pill,
.mg-theme-dark .mg-floor-switcher,
.mg-theme-dark .mg-zoom-controls,
.mg-theme-dark .mg-floor-button,
.mg-theme-dark .mg-icon-button,
.mg-theme-dark .mg-route-select,
.mg-theme-dark .mg-result-item,
.mg-theme-dark .mg-result-floor-option {
  background-color: #242426;
  color: #f4f4f4;
}

.mg-theme-dark .mg-search input,
.mg-theme-dark .mg-language,
.mg-theme-dark .mg-language-menu,
.mg-theme-dark .mg-pill,
.mg-theme-dark .mg-search-panel,
.mg-theme-dark .mg-route-select {
  border-color: #4a4a4f;
}

.mg-theme-dark.is-route-picking .mg-route-select {
  border-color: #ff3b3b;
}

.mg-theme-dark .mg-map-title,
.mg-theme-dark .mg-map-title__icon {
  color: #f4f4f4;
}

.mg-theme-dark .mg-floor-button.is-active {
  color: var(--mg-active);
}

.mg-theme-dark .mg-search input::placeholder {
  color: #f4f4f4;
}

.mg-theme-dark .mg-language-menu {
  background: #242426;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.mg-theme-dark .mg-language-option {
  color: #f4f4f4;
}

.mg-theme-dark .mg-language-option:hover,
.mg-theme-dark .mg-language-option:focus-visible,
.mg-theme-dark .mg-language-option.is-active {
  background: #fff;
  color: #111;
}

.mg-theme-dark .mg-results__title,
.mg-theme-dark .mg-result-item__name,
.mg-theme-dark .mg-route-point__copy strong,
.mg-theme-dark .mg-place-card__copy strong,
.mg-theme-dark .mg-guidance-message p,
.mg-theme-dark .mg-guidance-message__icon,
.mg-theme-dark .mg-route-arrow,
.mg-theme-dark .mg-result-count,
.mg-theme-dark .mg-result-dropdown-icon,
.mg-theme-dark .mg-result-floor-option svg {
  color: #f4f4f4;
}

.mg-theme-dark .mg-search__icon,
.mg-theme-dark .mg-panel-categories .mg-pill__icon,
.mg-theme-dark .mg-category-nav .mg-pill__icon {
  color: #f4f4f4;
}

.mg-theme-dark.is-search-open .mg-pill.is-active .mg-pill__icon {
  color: #111;
}

.mg-theme-dark .mg-store-marker__name,
.mg-theme-dark .mg-store-marker__caption {
  color: #050507;
}

.mg-theme-dark .mg-result-item__floor,
.mg-theme-dark .mg-route-point__copy span,
.mg-theme-dark .mg-place-card__copy span,
.mg-theme-dark .mg-result-floor-option {
  color: #b7b7bd;
}

.mg-theme-dark .mg-route-option {
  color: #f4f4f4;
}

.mg-theme-dark .mg-route-option__control {
  border-color: #f4f4f4;
  background: transparent;
}

.mg-theme-dark .mg-route-option input:checked + .mg-route-option__control {
  border-color: #fff;
  background: #fff;
}

.mg-theme-dark .mg-route-loading-button {
  background: #5e5e62;
  color: #f4f4f4;
}

.mg-theme-dark .mg-result-item,
.mg-theme-dark .mg-result-group,
.mg-theme-dark .mg-result-floor-option,
.mg-theme-dark .mg-result-floor-list {
  border-color: #3a3a3d;
}

.mg-theme-dark .mg-result-floor-option:hover,
.mg-theme-dark .mg-result-floor-option:focus-visible {
  color: #f4f4f4;
}

.mg-theme-dark .mg-result-item__logo,
.mg-theme-dark .mg-brand-logo,
.mg-theme-dark .mg-result-text-logo,
.mg-theme-dark .mg-store-marker__card,
.mg-theme-dark .mg-store-marker__card::after {
  background-color: #fff;
  color: #050507;
}

.mg-theme-dark.is-search-open .mg-pill.is-active {
  background-color: #fff;
  border-color: #fff;
  color: #111;
}

.mg-theme-dark .mg-floor-map {
  filter: none;
}


.mg-theme-dark .mg-pill__icon img,
.mg-theme-dark .mg-search__icon img,
.mg-theme-dark .mg-icon-button img,
.mg-theme-dark .mg-accessibility img {
  filter: brightness(0) invert(1);
}

.mg-theme-dark.is-search-open .mg-pill.is-active .mg-pill__icon img {
  filter: brightness(0);
}

.mg-theme-dark .mg-logo img {
  filter: none;
}

.mg-theme-dark .mg-logo__light {
  display: none;
}

.mg-theme-dark .mg-logo::after {
  display: block;
}

/* =========================================================
   Map Gateway entegrasyonu — dark mod ekleri
   (bina seçici, servis logoları, dinamik logo, kategori listesi)
   TODO(design): Dark mod renkleri tasarımcı onayı bekliyor.
   ========================================================= */
.mg-theme-dark .mg-building-select__toggle,
.mg-theme-dark .mg-building-select__menu {
  background-color: #242426;
  color: #f4f4f4;
}

.mg-theme-dark .mg-building-select__option {
  color: #f4f4f4;
}

.mg-theme-dark .mg-building-select__option:hover,
.mg-theme-dark .mg-building-select__option:focus-visible {
  background: #333338;
}

.mg-theme-dark .mg-result-item__logo.mg-result-item__logo--service,
.mg-theme-dark .mg-brand-logo.mg-brand-logo--service {
  background-color: #111;
}

.mg-theme-dark .mg-enter-building-button {
  border-color: #f4f4f4;
  background: transparent;
  color: #f4f4f4;
}

/* Dinamik logo: koyu logo yüklüyse light gizlenir, yoksa light görünür kalır.
   (Üstteki mock kuralı .mg-logo__light'ı koşulsuz gizliyor; burada ezilir.) */
.mg-theme-dark .mg-logo:not(.mg-logo--has-dark) .mg-logo__light {
  display: block;
}

.mg-theme-dark .mg-logo--has-dark .mg-logo__dark {
  display: block;
}

.mg-theme-dark .mg-result-back {
  color: #b7b7bd;
}

.mg-theme-dark .mg-result-back:hover,
.mg-theme-dark .mg-result-back:focus-visible {
  color: #f4f4f4;
}
