/* ==========================================================================
   Monash ITS Git Repo - site customisations
   Loaded via custom/templates/custom/header.tmpl
   Layers on top of whichever Gitea theme is active. Do NOT paste compiled
   Gitea CSS in here - that is what broke the 1.27 upgrade.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hide "Explore" links
   Replaces the commented-out <a> tags in the old head_navbar.tmpl.
   Note: this hides the link, it does not block the /explore route.
   Neither did the old template edit. Route access is governed by
   [service.explore] REQUIRE_SIGNIN_VIEW in app.ini.
   -------------------------------------------------------------------------- */
#navbar a.item[href$="/explore/repos"],
#navbar a.item[href$="/explore/organizations"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2. Hide "Help" links pointing at docs.gitea.com
   Covers both the top-level navbar link (signed-out) and the one inside
   the user avatar dropdown (signed-in).
   -------------------------------------------------------------------------- */
#navbar a[href^="https://docs.gitea.com"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3. Navbar hover
   The old theme used --color-gitea-lightblue-light, which no longer
   exists in Gitea 1.27. Uses the current primary palette instead, so it
   tracks whatever theme the user has selected.
   -------------------------------------------------------------------------- */
#navbar a.item:hover {
  background: var(--color-primary-light-4);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   4. Active tab shadow ("3d shadows" from the old theme)
   Delete this block if you would rather have the stock flat look.
   -------------------------------------------------------------------------- */
.ui.secondary.pointing.menu .active.item,
.ui.tabular.menu .active.item {
  box-shadow: none !important;
}

.ui.menu .active.item {
  color: var(--color-text);
  background: var(--color-body);
  box-shadow:
    0 1px 4px rgb(0 0 0 / 30%),
    0 0 40px rgb(0 0 0 / 10%) inset,
    0 12px 10px -10px rgb(0 0 0 / 10%) !important;
}

/* --------------------------------------------------------------------------
   5. Home page
   The old home.tmpl hid the Gitea marketing panels. Kept as a CSS
   safety net in case the home.tmpl override is ever removed.
   -------------------------------------------------------------------------- */
.page-content.home .ui.stackable.middle.very.relaxed.page.grid {
  display: none;
}
