/**
 * TARG Dashboard — branding and sidebar navigation icons.
 *
 * Zakres:
 * - grafitowe pole pod białym logo,
 * - własne liniowe ikony menu,
 * - usunięcie kolorowych ikon RealHomes,
 * - poprawa stanów aktywnych i hover.
 */

/* ==========================================================
   LEWA CZĘŚĆ HEADERA — TŁO POD BIAŁE LOGO
========================================================== */

.tds-app-header-brand {
position: relative;
display: flex;
align-items: center;
min-width: 300px;
height: 100%;
padding: 0 26px;
background: #262824;
border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/*
 * Logo pozostaje oryginalnym, białym plikiem.
 * Nie stosujemy filtra ani sztucznego tekstu.
 */

.tds-app-header-brand .tds-app-logo {
display: flex;
align-items: center;
min-width: 0;
height: 100%;
}

.tds-app-header-brand .tds-dashboard-logo {
display: inline-flex;
align-items: center;
max-width: 190px;
height: 100%;
}

.tds-app-header-brand .tds-dashboard-logo img {
display: block;
width: auto;
max-width: 180px;
height: auto;
max-height: 54px;
object-fit: contain;
object-position: left center;
opacity: 1;
filter: none;
}

/*
 * Gdy logo jest bardzo szerokie, zachowujemy odstęp
 * od przycisku menu.
 */

.tds-app-header-brand .tds-app-menu-toggle {
flex: 0 0 auto;
margin-right: 18px;
color: #ffffff;
}

.tds-app-header-brand .tds-app-menu-toggle span {
background: currentColor;
}

/* ==========================================================
   PRZYCISK ZWIJANIA SIDEBARA
========================================================== */

.rh-sidebar-menu-toggle,
.tds-app-menu-toggle {
color: #ffffff;
}

.dashboard-sidebar-toggle,
.dashboard-sidebar-trigger,
.sidebar-toggle,
.dashboard-toggle {
color: #343632 !important;
background: #ffffff !important;
border-color: #dcd8d0 !important;
box-shadow:
0 2px 5px rgba(26, 28, 25, 0.07),
0 9px 24px rgba(26, 28, 25, 0.12) !important;
}

.dashboard-sidebar-toggle:hover,
.dashboard-sidebar-trigger:hover,
.sidebar-toggle:hover,
.dashboard-toggle:hover {
color: #ffffff !important;
background: #9a6f42 !important;
border-color: #9a6f42 !important;
}

/* ==========================================================
   WSPÓLNE SELEKTORY NAWIGACJI
========================================================== */

.dashboard-sidebar a,
.tds-dashboard-sidebar a,
.rh_dashboard__sidebar a,
.dashboard-menu a,
.user-nav a {
--tds-nav-icon: none;
}

/*
 * Ukrywamy stare ikony RealHomes wyłącznie w sidebarze.
 * Tekst, strzałki rozwijania i pozostałe elementy pozostają.
 */

.dashboard-sidebar a > i:not(.fa-angle-down):not(.fa-angle-up):not(.fa-chevron-down),
.tds-dashboard-sidebar a > i:not(.fa-angle-down):not(.fa-angle-up):not(.fa-chevron-down),
.rh_dashboard__sidebar a > i:not(.fa-angle-down):not(.fa-angle-up):not(.fa-chevron-down),
.dashboard-menu a > i:not(.fa-angle-down):not(.fa-angle-up):not(.fa-chevron-down),
.user-nav a > i:not(.fa-angle-down):not(.fa-angle-up):not(.fa-chevron-down) {
display: none !important;
}

/*
 * Własna ikona jest tworzona jako maska SVG.
 */

.dashboard-sidebar a::before,
.tds-dashboard-sidebar a::before,
.rh_dashboard__sidebar a::before,
.dashboard-menu a::before,
.user-nav a::before {
content: "";
display: inline-block;
flex: 0 0 20px;
width: 20px;
height: 20px;
margin-right: 13px;
background-color: #6f726d;
-webkit-mask-image: var(--tds-nav-icon);
mask-image: var(--tds-nav-icon);
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-size: 20px 20px;
mask-size: 20px 20px;
transition:
background-color 150ms ease,
transform 150ms ease;
}

/*
 * Linki podmenu mają mniejsze ikony i spokojniejszy wygląd.
 */

.dashboard-sidebar ul ul a::before,
.tds-dashboard-sidebar ul ul a::before,
.rh_dashboard__sidebar ul ul a::before,
.dashboard-menu ul ul a::before,
.user-nav ul ul a::before {
flex-basis: 7px;
width: 7px;
height: 7px;
margin-right: 12px;
background: #b4a48f;
border-radius: 50%;
-webkit-mask-image: none;
mask-image: none;
}

/* ==========================================================
   IKONA: PANEL UŻYTKOWNIKA
========================================================== */

.dashboard-sidebar a[href*="module=dashboard"],
.tds-dashboard-sidebar a[href*="module=dashboard"],
.rh_dashboard__sidebar a[href*="module=dashboard"],
.dashboard-menu a[href*="module=dashboard"],
.user-nav a[href*="module=dashboard"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.2'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.2'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.2'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.2'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: MOJE NIERUCHOMOŚCI
========================================================== */

.dashboard-sidebar a[href*="module=properties"],
.tds-dashboard-sidebar a[href*="module=properties"],
.rh_dashboard__sidebar a[href*="module=properties"],
.dashboard-menu a[href*="module=properties"],
.user-nav a[href*="module=properties"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 11.2 12 4l8.5 7.2'/%3E%3Cpath d='M5.5 10.2V20h13v-9.8'/%3E%3Cpath d='M9.5 20v-6h5v6'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: ULUBIONE
========================================================== */

.dashboard-sidebar a[href*="module=favorites"],
.tds-dashboard-sidebar a[href*="module=favorites"],
.rh_dashboard__sidebar a[href*="module=favorites"],
.dashboard-menu a[href*="module=favorites"],
.user-nav a[href*="module=favorites"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 5.8a5 5 0 0 0-7.1 0L12 7.5l-1.7-1.7a5 5 0 0 0-7.1 7.1L12 21l8.8-8.1a5 5 0 0 0 0-7.1Z'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: ZAPISANE WYSZUKIWANIA
========================================================== */

.dashboard-sidebar a[href*="saved-search"],
.dashboard-sidebar a[href*="saved_search"],
.dashboard-sidebar a[href*="module=saved"],
.tds-dashboard-sidebar a[href*="saved-search"],
.tds-dashboard-sidebar a[href*="saved_search"],
.tds-dashboard-sidebar a[href*="module=saved"],
.rh_dashboard__sidebar a[href*="saved-search"],
.rh_dashboard__sidebar a[href*="saved_search"],
.dashboard-menu a[href*="saved-search"],
.user-nav a[href*="saved-search"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.3 15.3 5.2 5.2'/%3E%3Cpath d='M8 10.5h5'/%3E%3Cpath d='M10.5 8v5'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: PROFIL
========================================================== */

.dashboard-sidebar a[href*="module=profile"],
.tds-dashboard-sidebar a[href*="module=profile"],
.rh_dashboard__sidebar a[href*="module=profile"],
.dashboard-menu a[href*="module=profile"],
.user-nav a[href*="module=profile"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20c.8-4.2 3.3-6.3 7.5-6.3s6.7 2.1 7.5 6.3'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: WYLOGOWANIE
========================================================== */

.dashboard-sidebar a[href*="logout"],
.dashboard-sidebar a[href*="action=logout"],
.tds-dashboard-sidebar a[href*="logout"],
.tds-dashboard-sidebar a[href*="action=logout"],
.rh_dashboard__sidebar a[href*="logout"],
.dashboard-menu a[href*="logout"],
.user-nav a[href*="logout"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H5.5A1.5 1.5 0 0 0 4 5.5v13A1.5 1.5 0 0 0 5.5 20H10'/%3E%3Cpath d='M14 8l4 4-4 4'/%3E%3Cpath d='M18 12H9'/%3E%3C/svg%3E");
}

/* ==========================================================
   IKONA: POWRÓT DO STRONY
========================================================== */

.dashboard-sidebar a[href="/"],
.dashboard-sidebar a[href*="home_url"],
.tds-dashboard-sidebar a[href="/"],
.rh_dashboard__sidebar a[href="/"],
.dashboard-menu a[href="/"],
.user-nav a[href="/"] {
--tds-nav-icon:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6-6 6 6 6'/%3E%3Cpath d='M3 12h17'/%3E%3C/svg%3E");
}

/* ==========================================================
   STANY INTERAKCJI
========================================================== */

.dashboard-sidebar a:hover::before,
.tds-dashboard-sidebar a:hover::before,
.rh_dashboard__sidebar a:hover::before,
.dashboard-menu a:hover::before,
.user-nav a:hover::before {
background-color: #9a6f42;
transform: translateY(-1px);
}

.dashboard-sidebar .active > a::before,
.dashboard-sidebar .current-menu-item > a::before,
.dashboard-sidebar a.active::before,
.tds-dashboard-sidebar .active > a::before,
.tds-dashboard-sidebar a.active::before,
.rh_dashboard__sidebar .active > a::before,
.dashboard-menu .active > a::before,
.user-nav .active > a::before {
background-color: #9a6f42;
}

/*
 * Usuwamy turkusowe kolory RealHomes z pozostałych ikon
 * i elementów aktywnego menu.
 */

.dashboard-sidebar a > svg,
.tds-dashboard-sidebar a > svg,
.rh_dashboard__sidebar a > svg,
.dashboard-menu a > svg,
.user-nav a > svg {
display: none !important;
}

.dashboard-sidebar a,
.tds-dashboard-sidebar a,
.rh_dashboard__sidebar a,
.dashboard-menu a,
.user-nav a {
color: #5d605b;
}

.dashboard-sidebar a:hover,
.tds-dashboard-sidebar a:hover,
.rh_dashboard__sidebar a:hover,
.dashboard-menu a:hover,
.user-nav a:hover {
color: #343632;
}

/* ==========================================================
   ZWINIĘTY SIDEBAR
========================================================== */

body.dashboard-sidebar-collapsed .dashboard-sidebar a::before,
body.sidebar-collapsed .dashboard-sidebar a::before,
.dashboard-sidebar.collapsed a::before {
margin-right: 0;
}

body.dashboard-sidebar-collapsed .tds-app-header-brand,
body.sidebar-collapsed .tds-app-header-brand {
min-width: 82px;
padding-right: 18px;
padding-left: 18px;
}

body.dashboard-sidebar-collapsed .tds-app-logo,
body.sidebar-collapsed .tds-app-logo {
display: none;
}

/* ==========================================================
   RESPONSYWNOŚĆ
========================================================== */

@media (max-width: 900px) {
.tds-app-header-brand {
min-width: auto;
padding: 0 18px;
}

.tds-app-header-brand .tds-dashboard-logo img {
max-width: 145px;
max-height: 44px;
}
}

@media (max-width: 620px) {
.tds-app-header-brand {
padding: 0 14px;
}

.tds-app-header-brand .tds-dashboard-logo img {
max-width: 118px;
max-height: 38px;
}

.tds-app-header-brand .tds-app-menu-toggle {
margin-right: 12px;
}
}
