/* core_app/static/css/navbar.css */

/*
  Navbar CSS (Mevcut tasarımı koruyan sürüm)
  ----------------------------------------
  NOT: Önceki sürümde eklenen global resetler (html, body / body padding-top)
  navbar üstünde kalıcı boş alan davranışını bozduğu için KALDIRILDI.
*/

/* --------------------------------------------------------- */
/* Navbar base */
/* --------------------------------------------------------- */

.navbar-custom {
  background: #0f172a;
  /* Slate / koyu tema */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  min-height: 64px;

  /* Navbar'ın yukarıda başlaması için güvenli reset */
  top: 0;
  margin-top: 0;
  padding-top: 0;
}

/* Bootstrap sticky-top için */
.sticky-top {
  top: 0;
}

/* --------------------------------------------------------- */
/* Brand */
/* --------------------------------------------------------- */

.navbar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
}

.brand-text {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
}

.brand-360 {
  color: #f97316;
  /* Accent Orange */
}

/* --------------------------------------------------------- */
/* Layout helpers */
/* --------------------------------------------------------- */

.vertical-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 14px;
}

.nav-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------- */
/* Main links */
/* --------------------------------------------------------- */

.nav-main-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 12px !important;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.nav-main-link:hover {
  color: #f97316 !important;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Ev ikonu: Bildirim ziliyle aynı mavi (senin istediğin) */
.home-icon {
  opacity: 0.95;
  color: #60a5fa !important;
  /* Tailwind blue-400 benzeri: “mavi” */
}

/* --------------------------------------------------------- */
/* Glass button container */
/* --------------------------------------------------------- */

.nav-glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  transition: all 0.18s ease;
}

.nav-glass-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}

.panel-btn-link {
  color: rgba(255, 255, 255, 0.90) !important;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.panel-btn-link:hover {
  color: #f97316 !important;
}

/* Comm links */
.comm-link {
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  transition: all 0.18s ease;
}

.comm-link:hover {
  color: #f97316 !important;
}

/* --------------------------------------------------------- */
/* Notification */
/* --------------------------------------------------------- */

.notification-btn {
  position: relative;
  padding: 10px 12px !important;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.notification-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notification-icon {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.90);
}

/* --------------------------------------------------------- */
/* Role switch button (Navbar) */
/* --------------------------------------------------------- */

.role-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.18s ease;
}

.role-switch-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  color: #f97316;
}

.rs-mini-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.rs-mini-icon i {
  font-size: 1rem;
  opacity: 0.95;
}

.rs-mini-caret {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-left: 2px;
}

/* --------------------------------------------------------- */
/* Role switcher modal list items */
/* --------------------------------------------------------- */

.rs-role-item {
  padding: 14px 16px;
}

.rs-role-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.rs-role-icon i {
  font-size: 1.25rem;
}

/* Tonlar */
.tone-blue {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #dbeafe !important;
}

.tone-green {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border-color: #dcfce7 !important;
}

.tone-purple {
  background: #faf5ff !important;
  color: #7e22ce !important;
  border-color: #f3e8ff !important;
}

.tone-amber {
  background: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fef3c7 !important;
}

.tone-gray {
  background: #f8fafc !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}

.tone-slate {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

.tone-red {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fee2e2 !important;
}

/* Switch buton loading helper */
.btn-loading {
  pointer-events: none;
  opacity: 0.85;
}

/* --------------------------------------------------------- */
/* Dropdown menu polish */
/* --------------------------------------------------------- */

.dropdown-menu {
  border-radius: 16px;
}

.dropdown-item {
  font-weight: 600;
}

/* Profil dropdown'ı Lila asistan pop-up'ının üstünde açılsın */
.navbar-custom .nav-item.dropdown .dropdown-menu {
  z-index: 10050 !important;
  /* Lila z-index: 10000-10002, bu onun üstünde */
}

/* Navbar'ın kendisi de yüksek z-index'te olsun */
.navbar-custom {
  z-index: 1050;
}

/* Dropdown açıkken parent'ı da yükselt */
.navbar-custom .nav-item.dropdown.show {
  z-index: 10051;
}

/* --------------------------------------------------------- */
/* Mobile adjustments */
/* --------------------------------------------------------- */

@media (max-width: 991.98px) {
  .vertical-divider {
    display: none;
  }

  .nav-group {
    display: block;
  }

  .nav-glass-btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* --- MINIMAL PATCH: SADECE KONUŞULAN NOKTALAR --- */

/* 1) Tüm pill butonlar rol seçimi ile aynı yükseklik */
:root {
  --nav-pill-height: 40px;
}

/* rol butonun mevcut yüksekliği 40px ise */

.nav-glass-btn,
.role-switch-btn {
  height: var(--nav-pill-height);
  display: inline-flex;
  align-items: center;
}

/* Müteahhit paneli linki cam buton içinde: aynı hizaya otursun */
.panel-btn-link {
  display: inline-flex;
  align-items: center;
}

/* 2) Notification zili mavi */
.notification-icon {
  color: #60a5fa !important;
}

/* 3) Hover efekti tüm linklerde de olsun (sadece var olan davranışı GENİŞLETİR)
   Not: Ölçek (font büyümesi) yapmıyoruz, sadece senin mevcut turuncu + hafif yukarı hissini yayar */
.navbar-custom a.nav-main-link:hover,
.navbar-custom a.comm-link:hover,
.navbar-custom a.panel-btn-link:hover {
  color: #f97316 !important;
  transform: translateY(-1px);
}

/* --- PATCH: Panel butonu padding + ikon turuncu + navbar yüksekliği --- */

/* 1) Navbar yüksekliği: sadece iç dikey boşluğu artır (layout bozulmaz) */
.navbar-custom {
  padding-top: 0.65rem;
  /* önceki değerden biraz daha fazla */
  padding-bottom: 0.65rem;
  /* butonlar üste yapışık görünmez */
}

/* 2) "Müteahhit Paneli" butonu: sağ/sol boşluk artsın */
.panel-btn-link {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* Panel butonu içindeki ikon turuncu */
.panel-btn-link i,
.panel-btn-link .bi {
  color: #f97316 !important;
  /* turuncu */
}

/* 3) Cam buton konteynerleri de aynı yükseklikte merkezlensin (var olan karakteri bozmaz) */
.nav-glass-btn {
  align-items: center;
}

/* --- PATCH: Rol seçimi butonu role göre renklensin --- */

/* Ortak davranış (mevcut ölçülere dokunmaz) */
.role-switch-btn {
  border-width: 1px;
  border-radius: 8px !important;
  /* Dikdörtgene yakın yuvarlatma */
}

/* Ziyaretçi */
.role-switch-btn.tone-gray {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

/* Danışman */
.role-switch-btn.tone-purple {
  background: #faf5ff;
  border-color: #f3e8ff;
  color: #7e22ce;
}

/* Müteahhit */
.role-switch-btn.tone-blue {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1d4ed8;
}

/* Malik */
.role-switch-btn.tone-green {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #15803d;
}

/* Tedarikçi */
.role-switch-btn.tone-amber {
  background: #fffbeb;
  border-color: #fef3c7;
  color: #b45309;
}

/* Belediye (Özel) */
.role-switch-btn.tone-municipality {
  background: #ff6b6b !important;
  border-color: #fa5252 !important;
  color: #ffffff !important;
}

.rs-role-icon.tone-municipality {
  background: #ffe3e3 !important;
  color: #e03131 !important;
  border-color: #ffc9c9 !important;
}

/* İç ikon da role göre uyumlu olsun */
.role-switch-btn .rs-mini-icon {
  background: transparent;
}

/* --- FORCE PATCH: Mesajlar & Bağlantılarım ikonları --- */

/* Cam buton içindeki ikonlar */
.nav-glass-btn .comm-link i,
.nav-glass-btn .comm-link .bi,
.nav-glass-btn .comm-link svg {
  color: #60a5fa !important;
  fill: #60a5fa !important;
}

/* Hover'da da mavi kalsın (turuncuya dönmesin) */
.nav-glass-btn .comm-link:hover i,
.nav-glass-btn .comm-link:hover .bi,
.nav-glass-btn .comm-link:hover svg {
  color: #60a5fa !important;
  fill: #60a5fa !important;
}

/* --------------------------------------------------------- */
/* Notification Dropdown - Override Bootstrap Defaults */
/* --------------------------------------------------------- */

#notifDropdownWrapper .dropdown-menu {
  padding: 0 !important;
  overflow: hidden !important;
  min-width: 360px !important;
  border: none !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

#notifDropdownWrapper .dropdown-menu li {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

#notifDropdownWrapper .dropdown-menu a:not(.notif-mark-all-btn) {
  display: flex !important;
  padding: 0 !important;
  color: inherit !important;
  background: none !important;
}

#notifDropdownWrapper .dropdown-menu a:hover:not(.notif-mark-all-btn) {
  background: none !important;
  color: inherit !important;
}