/* Brutalist Navbar Styles */

.brutalist-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: #ffffff;
  border-bottom: 3px solid #000000;
  z-index: 10001 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-family: 'Google Sans Code', monospace;
}

/* Sub Header Styles - Ekranın Altında */
.map-sub-header.brutalist-sub-header {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: #ffffff;
  border-top: 2px solid #000000;
  z-index: 10000 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-family: 'Google Sans Code', monospace;
}

.map-sub-header .sub-header-left,
.map-sub-header .sub-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-sub-header .sub-header-right {
  margin-left: auto;
}

/* Sub header içindeki credits footer için pozisyonu sıfırla */
.map-sub-header .arccap-credits-footer {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

/* Sub header içindeki navbar-controls için stil */
.map-sub-header .navbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Sub header içindeki tools dropdown - yukarı doğru açılmalı */
.map-sub-header .navbar-tools-dropdown {
  position: relative;
}

.map-sub-header .brutalist-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  top: auto;
  left: 0;
  min-width: 160px;
  background: #ffffff;
  border: 2px solid #000000;
  display: none;
  z-index: 10001;
  font-family: 'Google Sans Code', monospace;
  box-shadow: 4px -4px 0 rgba(0, 0, 0, 0.1);
}

.map-sub-header .brutalist-dropdown-menu.show {
  display: block;
}

/* Sub header içindeki nav-item ve dropdown */
.map-sub-header .brutalist-nav-item {
  position: relative;
  height: 28px;
  display: inline-block;
}

.map-sub-header .brutalist-nav-btn {
  background: #ffffff;
  border: 1px solid #000000;
  color: #000000;
  font-family: 'Google Sans Code', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-transform: uppercase;
  position: relative;
  outline: none;
  user-select: none;
  z-index: 1;
  box-sizing: border-box;
  transform-origin: center center;
  overflow: visible;
}

.map-sub-header .brutalist-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  top: auto;
  left: 0;
  right: auto;
  min-width: 180px;
  max-width: calc(100vw - 20px);
  background: #ffffff;
  border: 4px solid #000000;
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 10001;
  box-shadow: 4px -4px 0 rgba(0,0,0,0.2);
}

/* Ekranın dışına taşmaması için - sağ tarafta ise sağa hizala */
.map-sub-header .sub-header-right .brutalist-nav-item .brutalist-dropdown {
  left: auto;
  right: 0;
}

/* Sub-header içindeki nav-item için dropdown pozisyonu */
.map-sub-header .brutalist-nav-item {
  position: relative;
}

.map-sub-header .brutalist-nav-item .brutalist-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: auto;
  transform: none;
}

/* Ekranın dışına taşmaması için kontrol */
.map-sub-header .brutalist-nav-item .brutalist-dropdown {
  max-width: calc(100vw - 20px);
}

/* Sub-header sağ tarafta ise dropdown'ı sağa hizala */
.map-sub-header .sub-header-right .brutalist-nav-item .brutalist-dropdown {
  left: auto;
  right: 0;
}

.map-sub-header .brutalist-nav-item.active .brutalist-dropdown {
  display: flex;
}

.map-sub-header .brutalist-dropdown-btn {
  background: #ffffff;
  border: 1px solid #000000;
  color: #000000;
  font-family: 'Google Sans Code', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-transform: uppercase;
  outline: none;
  user-select: none;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  transform-origin: center center;
  overflow: visible;
  text-decoration: none;
}

.map-sub-header .brutalist-dropdown-btn:hover {
  transform: translateY(-2px) scale(0.98);
}

.map-sub-header .brutalist-dropdown-btn:active {
  transform: translateY(-3px) scale(0.96);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-navbar .navbar-left,
.brutalist-navbar .navbar-center,
.brutalist-navbar .navbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brutalist-navbar .navbar-brand {
  font-family: 'Syne Mono', monospace; /* ArcCAP brand kendi fontunu kullanır */
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border: 2px solid #000000;
  background: #ffffff;
  transform-style: preserve-3d;
  transform: perspective(500px) rotateX(0deg);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

.brutalist-navbar .navbar-brand:hover {
  transform: perspective(500px) rotateX(-3deg) translateY(-1px) scale(0.98);
}

.brutalist-navbar .navbar-brand:active {
  transform: perspective(500px) rotateX(-6deg) translateY(2px) scale(0.96);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-navbar .navbar-brand .brand-arc {
  color: #000000;
}

.brutalist-navbar .navbar-brand .brand-cap {
  color: #ff2b2b;
}

.brutalist-navbar .navbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Brutalist Button Styles - 3D Küp (Gölgesiz, İnce) */
.brutalist-btn {
  min-width: 32px;
  width: auto;
  height: 32px;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Google Sans Code', monospace;
  font-size: 10px;
  font-weight: 700;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 10px;
  outline: none;
  user-select: none;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  transform-origin: center center;
  overflow: visible; /* Pseudo-elementlerin görünmesi için */
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* Navbar-right butonları için metin stili */
.navbar-right .brutalist-btn {
  padding: 0 12px;
  font-size: 10px;
  letter-spacing: 0.3px;
}

/* İkon içeren butonlar için sabit genişlik */
.brutalist-btn:has(svg),
.brutalist-btn:has(span[style*="font-size"]) {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.brutalist-btn > svg,
.brutalist-btn > span {
  position: relative;
  z-index: 1000;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-block;
  line-height: 1;
}

.brutalist-btn:hover > svg,
.brutalist-btn:hover > span {
  transform: scale(1.15);
  opacity: 0.9;
}

.brutalist-btn:active > svg,
.brutalist-btn:active > span {
  transform: scale(0.95);
}

.brutalist-btn-search > svg,
.brutalist-btn-search > span {
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-block;
  line-height: 1;
}

.brutalist-btn-search:hover > svg,
.brutalist-btn-search:hover > span {
  transform: scale(1.15);
  opacity: 0.8;
}

.brutalist-dropdown-item > span:first-child {
  display: inline-block;
  margin-right: 6px;
  line-height: 1;
  vertical-align: middle;
}

/* Modules Dropdown Styles */
.module-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

.module-text {
  display: inline-block;
  vertical-align: middle;
  font-weight: 600;
}

.module-badge {
  display: inline-block;
  margin-left: auto;
  padding: 2px 6px;
  background: #ff2b2b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 2px;
  vertical-align: middle;
}

.brutalist-dropdown-btn[data-module] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Üst yüz (küp derinliği) - bg-top - Konteyner dışında kalır */
.brutalist-btn::before {
  content: '';
  position: absolute;
  height: 3px;
  background: #000000;
  bottom: 100%;
  left: 0px;
  right: 0px;
  transform: skew(-45deg, 0) translateX(-1px);
  margin: 0;
  transition: height 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  transform-origin: bottom center;
  pointer-events: none;
}

/* Sağ yan yüz (küp derinliği) - bg-right - Konteyner dışında kalır */
.brutalist-btn::after {
  content: '';
  position: absolute;
  background: #000000;
  top: 0px;
  z-index: 0;
  bottom: 0px;
  width: 3px;
  left: 100%;
  transform: skew(0, -45deg) translateY(-1px);
  transition: width 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
  pointer-events: none;
}

/* Hover: Basılmış görünüm (renk değişmez, sadece pozisyon) */
.brutalist-btn:hover {
  transform: translateY(2.5px) scale(0.98);
}

/* Hover durumunda gölge küçülür ama konteyner dışında kalır */
.brutalist-btn:hover::before {
  height: 2px;
  opacity: 0.8;
  /* Pozisyon sabit kalır, sadece boyut değişir */
}

.brutalist-btn:hover::after {
  width: 2px;
  opacity: 0.8;
  /* Pozisyon sabit kalır, sadece boyut değişir */
}

/* Active: Tıklama animasyonu - Daha gerçekçi basma hissi */
.brutalist-btn:active {
  transform: translateY(4px) scale(0.96);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn:active::before {
  height: 1.5px;
  opacity: 0.6;
  transition: height 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
  /* Pozisyon sabit kalır */
}

.brutalist-btn:active::after {
  width: 1.5px;
  opacity: 0.6;
  transition: width 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
  /* Pozisyon sabit kalır */
}

/* Aktif durum: Basılmış görünüm (renk değişmez) */
.brutalist-btn.active {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn.active::before {
  height: 2px;
  opacity: 0.8;
  /* Pozisyon sabit kalır */
}

.brutalist-btn.active::after {
  width: 2px;
  opacity: 0.8;
  /* Pozisyon sabit kalır */
}

/* Aktif durumda hover: Aynı basılmış görünüm */
.brutalist-btn.active:hover {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn svg {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1000;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0); /* GPU acceleration */
  display: block;
  fill: currentColor;
  stroke: currentColor;
  color: #000000;
  pointer-events: none;
  flex-shrink: 0;
}

/* SVG iconların butonla birlikte hareket etmesi için */
.brutalist-btn:hover svg,
.brutalist-btn:active svg,
.brutalist-btn.active svg {
  transform: translateZ(0);
}

/* Admin Button (Control Panel) */
.brutalist-btn-admin {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.brutalist-btn-admin::before,
.brutalist-btn-admin::after {
  background: #000000;
}

/* Admin hover: Basılmış görünüm */
.brutalist-btn-admin:hover {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn-admin:hover::before {
  height: 2px;
  opacity: 0.8;
}

.brutalist-btn-admin:hover::after {
  width: 2px;
  opacity: 0.8;
}

.brutalist-btn-admin:active {
  transform: translateY(4px) scale(0.96);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-admin:active::before {
  height: 1.5px;
  opacity: 0.6;
  transition: height 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-admin:active::after {
  width: 1.5px;
  opacity: 0.6;
  transition: width 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-admin.active {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn-admin.active::before {
  height: 2px;
  opacity: 0.8;
}

.brutalist-btn-admin.active::after {
  width: 2px;
  opacity: 0.8;
}

.brutalist-btn-admin.active:hover {
  transform: translateY(2.5px) scale(0.98);
}

/* Admin active: Basılmış görünüm (renk değişmez) */

.brutalist-btn-admin.active::before,
.brutalist-btn-admin.active::after {
  background: #000000;
}

/* Logout Button */
.brutalist-btn-logout {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.brutalist-btn-logout::before,
.brutalist-btn-logout::after {
  background: #000000;
}

/* Logout hover: Basılmış görünüm */
.brutalist-btn-logout:hover {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn-logout:hover::before {
  height: 2px;
  opacity: 0.8;
}

.brutalist-btn-logout:hover::after {
  width: 2px;
  opacity: 0.8;
}

.brutalist-btn-logout:active {
  transform: translateY(4px) scale(0.96);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-logout:active::before {
  height: 1.5px;
  opacity: 0.6;
  transition: height 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-logout:active::after {
  width: 1.5px;
  opacity: 0.6;
  transition: width 0.08s cubic-bezier(0.4, 0, 0.6, 1),
              opacity 0.08s cubic-bezier(0.4, 0, 0.6, 1);
}

.brutalist-btn-logout.active {
  transform: translateY(2.5px) scale(0.98);
}

.brutalist-btn-logout.active::before {
  height: 2px;
  opacity: 0.8;
}

.brutalist-btn-logout.active::after {
  width: 2px;
  opacity: 0.8;
}

.brutalist-btn-logout.active:hover {
  transform: translateY(2.5px) scale(0.98);
}

/* Logout active: Basılmış görünüm (renk değişmez) */

.brutalist-btn-logout.active::before,
.brutalist-btn-logout.active::after {
  background: #000000;
}

/* Hidden class */
.brutalist-navbar .hidden {
  display: none !important;
}

.brutalist-navbar .visible {
  display: flex !important;
}

/* Dark mode support */
[data-theme="dark"] .brutalist-navbar {
  background: #1a1a1a;
  border-bottom-color: #ffffff;
}

[data-theme="dark"] .brutalist-navbar .navbar-brand {
  background: #1a1a1a;
  border-color: #ffffff;
  color: #ffffff;
}

[data-theme="dark"] .brutalist-navbar .navbar-brand .brand-arc {
  color: #ffffff;
}

[data-theme="dark"] .brutalist-btn {
  background: #1a1a1a;
  border-color: #ffffff;
  color: #ffffff;
}

[data-theme="dark"] .brutalist-btn:hover {
  background: #2a2a2a;
}

[data-theme="dark"] .brutalist-btn.active {
  background: #ffffff;
  color: #000000;
}

[data-theme="dark"] .brutalist-btn.active:hover {
  background: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
  .brutalist-navbar {
    height: 40px;
    padding: 0 8px;
  }
  
  .brutalist-navbar .navbar-brand {
    font-size: 14px;
    padding: 3px 6px;
  }
  
  .brutalist-btn {
    width: 28px;
    height: 28px;
  }
  
  .brutalist-btn svg {
    width: 12px;
    height: 12px;
  }
  
  .brutalist-navbar .navbar-controls {
    gap: 3px;
  }
}

