/*
 * MU DITO V14 — TemplateWars cursor + fantasy navbar emoji badges
 * Visual-only extension over V13. No route/form/WebEngine logic is changed here.
 */

/* -------------------------------------------------------------------------- */
/* Exact mouse cursors extracted from templatewars.zip                        */
/* -------------------------------------------------------------------------- */
@media (hover:hover) and (pointer:fine) {
  /* Restore a real system cursor; V9 hid it for the ring cursor. */
  body.mudito-v14,
  body.mudito-v14 * {
    cursor:url('../img/cursor_normal.cur'), auto !important;
  }

  body.mudito-v14 a,
  body.mudito-v14 button,
  body.mudito-v14 [role="button"],
  body.mudito-v14 label[for],
  body.mudito-v14 select,
  body.mudito-v14 summary,
  body.mudito-v14 input[type="button"],
  body.mudito-v14 input[type="submit"],
  body.mudito-v14 input[type="reset"],
  body.mudito-v14 input[type="checkbox"],
  body.mudito-v14 input[type="radio"],
  body.mudito-v14 .top-list,
  body.mudito-v14 .panel-downloads,
  body.mudito-v14 .md13-menu-toggle {
    cursor:url('../img/cursor_link.cur'), pointer !important;
  }

  /* The TemplateWars cursor replaces the old floating ring/dot. Keep only the
     subtle click pulse already present in the MU DITO theme. */
  body.mudito-v14 .md9-cursor-ring,
  body.mudito-v14 .md9-cursor-dot {
    display:none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Main navbar — fantasy emoji badges                                         */
/* -------------------------------------------------------------------------- */
.mudito-v14 .topPanel .menu a {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  line-height:1 !important;
  padding-left:13px !important;
  padding-right:13px !important;
}

.mudito-v14 .md14-nav-icon {
  position:relative;
  flex:0 0 27px;
  width:27px;
  height:27px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(218,167,70,.36);
  border-radius:7px;
  background:
    radial-gradient(circle at 35% 28%,rgba(73,154,255,.19),transparent 45%),
    linear-gradient(145deg,rgba(13,28,48,.90),rgba(4,10,19,.95));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 14px rgba(40,125,227,.06),
    0 0 0 1px rgba(0,0,0,.52),
    0 3px 9px rgba(0,0,0,.34);
  font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif !important;
  font-size:15px;
  line-height:1;
  transform:translateY(0);
  filter:saturate(.92) drop-shadow(0 1px 2px rgba(0,0,0,.75));
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    filter .18s ease;
}

.mudito-v14 .md14-nav-icon:after {
  content:"";
  position:absolute;
  left:5px;
  right:5px;
  bottom:2px;
  height:1px;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,rgba(232,185,82,.78),transparent);
  opacity:.42;
}

.mudito-v14 .md14-nav-text {
  display:inline-block;
  line-height:1;
  transform:translateY(.5px);
}

.mudito-v14 .topPanel .menu a:hover .md14-nav-icon,
.mudito-v14 .topPanel .menu .active a .md14-nav-icon {
  transform:translateY(-1px) scale(1.07);
  border-color:rgba(244,191,83,.78);
  background:
    radial-gradient(circle at 30% 24%,rgba(75,168,255,.30),transparent 48%),
    radial-gradient(circle at 75% 78%,rgba(224,66,46,.11),transparent 48%),
    linear-gradient(145deg,rgba(16,36,62,.96),rgba(6,12,21,.98));
  box-shadow:
    inset 0 0 13px rgba(47,143,255,.11),
    0 0 12px rgba(55,151,255,.16),
    0 0 13px rgba(225,164,58,.12);
  filter:saturate(1.08) drop-shadow(0 0 4px rgba(240,183,72,.18));
}

.mudito-v14 .topPanel .menu .active a .md14-nav-icon {
  box-shadow:
    inset 0 0 13px rgba(47,143,255,.13),
    0 0 13px rgba(71,160,255,.21),
    0 0 18px rgba(225,164,58,.17);
}

/* Give each category a restrained MU-style accent while keeping one language. */
.mudito-v14 .topPanel .menu li:nth-child(1) .md14-nav-icon { border-color:rgba(69,157,246,.46); }
.mudito-v14 .topPanel .menu li:nth-child(2) .md14-nav-icon { border-color:rgba(213,166,76,.46); }
.mudito-v14 .topPanel .menu li:nth-child(3) .md14-nav-icon { border-color:rgba(111,139,235,.46); }
.mudito-v14 .topPanel .menu li:nth-child(4) .md14-nav-icon { border-color:rgba(65,161,247,.50); }
.mudito-v14 .topPanel .menu li:nth-child(5) .md14-nav-icon { border-color:rgba(219,170,65,.56); }
.mudito-v14 .topPanel .menu li:nth-child(6) .md14-nav-icon { border-color:rgba(224,91,63,.46); }

/* Notebook safety — icons stay visible without crowding the centered menu. */
@media (min-width:981px) and (max-width:1240px) {
  .mudito-v14 .topPanel .menu a {
    gap:5px !important;
    padding-left:7px !important;
    padding-right:7px !important;
  }
  .mudito-v14 .md14-nav-icon {
    flex-basis:23px;
    width:23px;
    height:23px;
    border-radius:6px;
    font-size:13px;
  }
}

/* Responsive hamburger menu: larger hit area and left-aligned fantasy badges. */
@media (max-width:980px) {
  .mudito-v14 .topPanel .menu a {
    justify-content:flex-start !important;
    gap:10px !important;
    padding:0 14px !important;
  }
  .mudito-v14 .md14-nav-icon {
    flex-basis:28px;
    width:28px;
    height:28px;
    font-size:15px;
  }
}

/* Touch devices use the native cursor and don't receive the desktop custom cursor. */
@media (hover:none), (pointer:coarse) {
  body.mudito-v14,
  body.mudito-v14 * {
    cursor:auto !important;
  }
}
