/**
 * Special fix for active menu links
 * Uses very high specificity to ensure it overrides other styles
 */

/* Direct targeting of active menu links in the mega menu */
#menuOverlay a.tw-block.tw-text-gray-600.is-active[aria-current="page"],
#menuOverlay a.tw-block.tw-text-gray-600.is-active,
#menuOverlay a.tw-block.tw-text-gray-600[aria-current="page"],
#menuOverlay .tw-ml-3.tw-space-y-2 li a.tw-block.tw-text-gray-600.is-active,
#menuOverlay .tw-ml-3.tw-space-y-2 li a.tw-block.tw-text-gray-600[aria-current="page"] {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: currentColor !important;
  -webkit-text-decoration: underline !important;
  -webkit-text-decoration-line: underline !important;
  -webkit-text-underline-offset: 0.15em !important;
  -webkit-text-decoration-thickness: 1px !important;
}

/* We're NOT applying underline to all parent categories - only target parent of active items */
/* Instead, let the JavaScript handle this dynamically */

/* Parent category - ONLY when it contains an active item */
#menuOverlay li:has(> ul > li > a.is-active) > a.tw-font-bold.tw-text-md.tw-uppercase.tw-mb-3,
#menuOverlay li:has(> ul > li > a[aria-current="page"]) > a.tw-font-bold.tw-text-md.tw-uppercase.tw-mb-3 {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
}

/* Special case for ΠΟΛΙΤΙΣΜΌΣ when viewing subcategories */
body.path-news.path-politismos #menuOverlay a[href="/news/politismos"].tw-font-bold.tw-text-md.tw-uppercase {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
}

/* Inline style override to guarantee application */
#menuOverlay li a.is-active,
#menuOverlay li a[aria-current="page"] {
  text-decoration: underline !important;
}

/* Handle admin sidebar positioning for fixed header */
body.toolbar-fixed .navbar-fixed {
  top: 36px;
}

body.toolbar-tray-open.toolbar-fixed .navbar-fixed {
  top: 36px;
}

/* When admin sidebar is present, adjust left position */
body.toolbar-menu-administration .navbar-fixed {

}
.gin--vertical-toolbar.sticky-header-active #header {
  top: 50px;
}

/* Only apply left positioning on desktop, not mobile */
@media (min-width: 768px) {
  .gin--vertical-toolbar.sticky-header-active #header {
    left: 65px;
    width: calc(100% - 65px);
    top: 50px;
  }
}

/* if  data-toolbar-menu="open" then hide */
/* .gin--vertical-toolbar.sticky-header-active[data-toolbar-menu="open"] #header {
  display: none;
} */

/* Alternative approach using body classes when admin menu is active */
/* body.toolbar-menu-administration-active #header {
  display: none;
} */

/* Custom toolbar icon using KOINI-GNOMI logo */
.toolbar .toolbar-bar #toolbar-item-administration-tray .toolbar-icon-admin-toolbar-tools-help.toolbar-icon-default:before {
  padding-inline: 0!important;
  margin-inline-start: 0!important;
  background-color: black!important;
  -webkit-mask-image: url(../img/admin_logo.svg)!important;
  mask-image: url(../img/admin_logo.svg)!important;
  -webkit-mask-position: center center!important;
  mask-position: center center!important;
  -webkit-mask-size: contain!important;
  mask-size: contain!important;
  -webkit-mask-repeat: no-repeat!important;
  mask-repeat: no-repeat!important;
}

