/* Navigation with icons: desktop bar, dropdown cards and mobile drawer rows. */

.nav__icon { color: var(--brand); font-size: .92em; width: 1.15em; text-align: center; transition: transform .25s, color .2s; }
.nav__link span { line-height: 1.2; }
.nav__dropdown a i { color: var(--brand); width: 1.2em; text-align: center; font-size: .9em; flex-shrink: 0; }

/* Desktop */
@media (min-width: 1100px) {
    .nav__list { gap: 4px; }
    .nav__item > .nav__link { position: relative; padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--ink); gap: 8px; }
    .nav__item > .nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .28s; }
    .nav__item:hover > .nav__link, .nav__item.is-active > .nav__link { background: var(--brand-soft); color: var(--brand-dark); }
    .nav__item:hover > .nav__link::after, .nav__item.is-active > .nav__link::after { transform: scaleX(1); }
    .nav__item:hover > .nav__link .nav__icon { transform: translateY(-2px) scale(1.15); }
    .nav__caret { margin-left: 2px; transition: transform .25s; }
    .nav__item:hover > .nav__link .nav__caret { transform: rotate(180deg); }

    .nav__dropdown { top: calc(100% + 10px); min-width: 250px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 22px 50px rgba(17, 48, 58, .16); }
    .nav__dropdown::before { content: ""; position: absolute; top: -7px; left: 26px; width: 14px; height: 14px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
    .nav__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
    .nav__dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 500; color: var(--ink); transition: background .18s, padding-left .18s; }
    .nav__dropdown a i { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); display: grid; place-items: center; transition: background .18s, color .18s; }
    .nav__dropdown a:hover { background: var(--brand-soft); padding-left: 16px; color: var(--brand-dark); }
    .nav__dropdown a:hover i { background: var(--brand); color: #fff; }
}

/* Mobile drawer */
@media (max-width: 1099px) {
    .nav__link { gap: 12px; justify-content: flex-start; }
    .nav__link .nav__icon { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; font-size: .95rem; flex-shrink: 0; }
    .nav__item.is-active > .nav__link .nav__icon, .nav__item.is-expanded > .nav__link .nav__icon { background: var(--brand); color: #fff; }
    .nav__link span { flex: 1; }
    .nav__dropdown a { display: flex; align-items: center; gap: 10px; }
    .nav__dropdown a i { font-size: .78rem; opacity: .85; }
}

/* Current page */
.nav__dropdown a.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.nav__dropdown a.is-active i { background: var(--brand); color: #fff; }
@media (max-width: 1099px) {
    .nav__item.is-active > .nav__link { background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 4px 0 0 var(--brand); }
    .nav__dropdown a.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--accent); }
}

/* Active page style (Admin > Site Settings > Brand & theme > Active menu style). No underline. */
@media (min-width: 1100px) {
    .nav__item > .nav__link::after { display: none; }
    .nav__item:not(.is-active):hover > .nav__link { background: var(--brand-soft); color: var(--brand-dark); }

    /* soft: light tint, green text, icon in a white chip */
    .nav-active-soft .nav__item.is-active > .nav__link { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
    .nav-active-soft .nav__item.is-active > .nav__link .nav__icon { background: #fff; color: var(--brand); width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; box-shadow: 0 2px 6px rgba(17, 48, 58, .12); }

    /* dot: plain green bold text with a small dot underneath */
    .nav-active-dot .nav__item.is-active > .nav__link { background: transparent; color: var(--brand); font-weight: 700; }
    .nav-active-dot .nav__item.is-active > .nav__link::after { display: block; content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); transform: none; height: 6px; right: auto; }

    /* topline: coloured bar on the very top edge of the header */
    .nav-active-topline .nav__item.is-active > .nav__link { background: transparent; color: var(--brand); font-weight: 700; }
    .nav-active-topline .nav__item.is-active::before { content: ""; position: absolute; left: 14px; right: 14px; top: -17px; height: 4px; border-radius: 0 0 4px 4px; background: var(--brand); }

    /* pill: solid green button */
    .nav-active-pill .nav__item.is-active > .nav__link { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px var(--brand); }
    .nav-active-pill .nav__item.is-active > .nav__link .nav__icon, .nav-active-pill .nav__item.is-active > .nav__link .nav__caret { color: #fff; opacity: 1; }

    /* text: only the text and icon turn green */
    .nav-active-text .nav__item.is-active > .nav__link { background: transparent; color: var(--brand); font-weight: 700; }
}

@media (min-width: 1100px) {
    .nav__dropdown { min-width: 210px; padding: 6px; border-radius: 12px; }
    .nav__dropdown a { gap: 9px; padding: 6px 10px; font-size: .84rem; border-radius: 8px; }
    .nav__dropdown a i { width: 24px; height: 24px; border-radius: 7px; font-size: .72rem; }
    .nav__dropdown a:hover { padding-left: 12px; }
}
@media (max-width: 1099px) {
    .nav__dropdown a { padding: 6px 4px; font-size: .84rem; gap: 8px; }
    .nav__dropdown a i { font-size: .7rem; }
    .nav__dropdown { padding-bottom: 6px; }
}

@media (min-width: 1100px) {
    .nav__dropdown { width: max-content; min-width: 210px; max-width: 360px; }
    .nav__dropdown a { white-space: nowrap; }
}

@media (min-width: 1100px) {
    .nav__item > .nav__link { padding: 6px 12px; border-radius: 8px; font-size: .88rem; gap: 7px; }
    .nav__item > .nav__link::after { left: 12px; right: 12px; bottom: 1px; height: 2px; }
}

@media (min-width: 1100px) {
    .nav-active-soft .nav__item.is-active > .nav__link { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--brand); }
    .nav-active-soft .nav__item.is-active > .nav__link::after { display: none; }
    .nav-active-soft .nav__item.is-active > .nav__link .nav__icon { background: var(--brand); color: #fff; width: 22px; height: 22px; border-radius: 6px; font-size: .7rem; }
    .nav-active-outline .nav__item.is-active > .nav__link { background: #fff; color: var(--brand); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--brand), 0 4px 12px -6px var(--brand); }
    .nav-active-outline .nav__item.is-active > .nav__link::after { display: none; }
    .nav-active-outline .nav__item:not(.is-active):hover > .nav__link { background: var(--brand-soft); }
}
