/* schede-sub.css — v114: «Schede ▾» = a real dropdown menu (Alberto, 17 Nov 2026): Elementari ▸ · Medie ▸ · A Scuola ▸ one under the other,
   and each one opens its own list of classes beside it (computer) or under it (phone). Behaviour: assets/js/schede-sub.js */
.ssub { display: grid; gap: 6px; }
.ssub-g { position: relative; }
.ssub-tab { --t: #E8484D; width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  font: 800 16px 'Nunito', system-ui, sans-serif; padding: 10px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--sh-fg, var(--fg)); }
.ssub-tab span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex: none;
  background: color-mix(in srgb, var(--t) 18%, transparent); }
.ssub-tab::after { content: '▸'; margin-left: auto; color: var(--t); font-size: 15px; }
.ssub-g.g-med .ssub-tab { --t: #7E46CF; } .ssub-g.g-sc .ssub-tab { --t: #F08A1C; }
.ssub-g.open > .ssub-tab, .ssub-tab:hover { background: color-mix(in srgb, var(--t) 14%, transparent); }
.ssub-g.open > .ssub-tab { box-shadow: inset 4px 0 0 var(--t); }
.ssub-list { list-style: none; margin: 0; padding: 8px; display: none !important; gap: 4px; min-width: 300px; }
.ssub-g.open > .ssub-list { display: grid !important; animation: ssubIn .18s ease-out; }
@keyframes ssubIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* computer: a small dropdown card under «Schede ▾», each group's classes fly out to the right */
@media (min-width: 1041px) {
  .panel:has(.ssub), .sh-panel:has(.ssub) { position: absolute; top: 100%; left: var(--dd-x, 30%); width: auto; max-height: none; overflow: visible;
    border: 1px solid var(--sh-line, var(--line)); border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.18); background: var(--sh-surface, var(--surface)); }
  .panel:has(.ssub) > .wrap, .sh-panel:has(.ssub) > .sh-wrap { display: block; padding: 8px; max-width: none; }
  .ssub { width: 240px; }
  .ssub-list { position: absolute; left: calc(100% + 10px); top: -8px; background: var(--sh-surface, var(--surface));
    border: 1px solid var(--sh-line, var(--line)); border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.18); border-top: 4px solid var(--t, #888); }
  .ssub-g.g-prim .ssub-list { --t: #E8484D; } .ssub-g.g-med .ssub-list { --t: #7E46CF; } .ssub-g.g-sc .ssub-list { --t: #F08A1C; }
}
/* phone / tablet «Menu»: the classes open right under their group */
@media (max-width: 1040px) {
  .ssub-g.open > .ssub-tab::after { content: '▾'; }
  .ssub-list { min-width: 0; padding: 4px 0 6px 18px; }
}
@media (prefers-reduced-motion: reduce) { .ssub-g.open > .ssub-list { animation: none; } }

/* v115 (Alberto: «the colours clash — a standard menu, same colour writing as "Schede", closed by default»):
   plain menu: no emoji badges, no coloured circles or bars; writing = the menu's own colour; hover = the menu's soft green. */
.ssub-tab, .ssub-g .ssub-tab { --t: currentColor; font: 700 15px 'Nunito', system-ui, sans-serif; padding: 9px 12px; color: var(--sh-fg, var(--fg)); }
.ssub-tab span { display: none; }
.ssub-tab::after { color: var(--sh-muted, var(--muted)); font-size: 12px; }
.ssub-tab:hover, .ssub-g.open > .ssub-tab { background: var(--sh-green-soft, var(--green-soft)); box-shadow: none; }
.ssub-list .sh-yr i, .ssub-list .yr i { display: none; }
.ssub-list .sh-yr, .ssub-list .yr { font: 700 15px 'Nunito', system-ui, sans-serif; padding: 8px 12px; color: var(--sh-fg, var(--fg)); }
.ssub-list .sh-yr small, .ssub-list .yr small { font-size: 13px; }
.ssub-list { min-width: 250px; padding: 6px; }
@media (min-width: 1041px) {
  .ssub { width: 200px; }
  .ssub-list, .ssub-g.g-prim .ssub-list, .ssub-g.g-med .ssub-list, .ssub-g.g-sc .ssub-list { border-top: 1px solid var(--sh-line, var(--line)); top: -6px; }
}
.panel .ssub-list a.yr i, .sh-panel .ssub-list .sh-yr i { display: none; }
.panel .ssub-list a.yr, .sh-panel .ssub-list .sh-yr { white-space: nowrap; gap: 18px; }
.ssub-list { min-width: 300px; }
