/* UOItalia Reborn — barra statistiche: struttura, lingue, desktop e mobile.
   Le regole generali precedono il layout delle voci del modulo Joomla. */
:where(.site) > .stats {
  white-space: nowrap;
  font: 700 13px Georgia;
}
:where(.site) > .stats a:hover,:where(.site) > .stats button:hover {
  color: #fff;
}
:where(.site) > .stats .date {
  font-size: 12px;
  font-weight: 400;
}
.site > .stats {
  display: flex !important;
  align-items: center !important;
  border: 0;
  color: #e8d5ae;
  overflow: visible !important;
}
.site > .stats a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0;
  white-space: var(--uoi-stat-white-space, nowrap);
  height: 17px;
  text-shadow: 0 1px 2px #0008;
}
.site > .stats a:hover {
  color: #fff5d9;
}
.site > .stats {
  padding: 0 clamp(8px,1.3vw,20px);
  min-height: 44px;
  height: 44px;
}
.site > .stats a {
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(10px,.84vw,12px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
  flex: 0 1 auto !important;
  padding: var(--uoi-stat-link-padding, 0 clamp(6px,.85vw,13px));
  border-left: var(--uoi-stat-divider, 1px solid #9e7c4c);
}
.site > .stats a:first-child {
  border-left: 0;
}
@media (max-width:1200px) {
  .site > .stats {
      scrollbar-width: thin;
    }
}
.site>.stats {
  position: relative !important;
  z-index: 5 !important;
  border-top: 2px solid #c29a5e;
  border-bottom: 2px solid #c29a5e;
  box-shadow: inset 0 1px #57718b,0 3px 0 #05101d;
  background: linear-gradient(180deg,#071626,#102c46 48%,#061725);
}
.site>.stats:before,.site>.stats:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(90deg,#a57536,#f6d698,#6d431f);
  pointer-events: none;
}
.site>.stats:before {
  left: 0;
}
.site>.stats:after {
  right: 0;
}
.site > .stats > .language {
  align-self: center !important;
  justify-content: center !important;
}
.site > .stats {
  justify-content: space-between !important;
  gap: var(--uoi-stats-group-gap, 0);
}
.site > .stats > .language {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px;
  height: 36px;
  box-sizing: border-box;
  margin: 0 0 0 6px;
  padding: 3px 5px 3px 9px;
  border: 1px solid #cda15d;
  border-radius: 4px;
  background: linear-gradient(180deg,#183e5d,#082035);
  box-shadow: 0 0 0 1px #07121b,inset 0 1px 0 #577b99,0 0 10px #d7ae4930;
  z-index: 7 !important;
}
.site > .stats > .language .lang-label {
  color: #f4ce85;
  font: 700 10px Georgia,serif;
  letter-spacing: .8px;
  margin-right: 4px;
  white-space: nowrap;
}
.site>.stats .stats-links {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  grid-auto-flow: column;
  grid-auto-columns: var(--uoi-stats-column-width, minmax(max-content,1fr));
  align-content: center;
  align-items: center;
  justify-items: stretch;
}
.site>.stats .stats-links>a,
.site>.stats .stats-links>.uoi-stats-separator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  min-width: 0;
  text-align: center;
}
.stats-mobile-toggle {
  display: none;
}
.site>.stats>.language .lang-short {
  display: none !important;
}
@media (max-width:1200px) {
  .site>.stats {
      height: 56px;
      min-height: 56px;
      padding: 0 clamp(8px,2vw,22px);
      gap: 10px;
      white-space: normal;
    }
  .site>.stats.stats-open {
      z-index: var(--uoi-open-stats-layer, 2000) !important;
    }
  .site>.stats .stats-mobile-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex: 0 1 auto;
      min-width: 0;
      min-height: 36px;
      padding: 8px 11px;
      border: 1px solid #cda15d;
      border-radius: 3px;
      background: linear-gradient(180deg,#1b4766,#0a243b);
      box-shadow: inset 0 1px 0 #6085a0,0 2px 5px #0007;
      color: #f5d79c;
      font: 700 12px/1 Georgia,serif;
      letter-spacing: .06em;
      white-space: nowrap;
      cursor: pointer;
    }
  .site>.stats .stats-mobile-toggle:hover,.site>.stats .stats-mobile-toggle:focus-visible {
      background: linear-gradient(180deg,#275a7b,#133650);
      outline: 2px solid #e2bb77;
      outline-offset: 2px;
    }
  .site>.stats .stats-toggle-icon {
      font-size: 18px;
      line-height: 1;
      opacity: .92;
    }
  .site>.stats .stats-toggle-caret {
      font-size: 16px;
      line-height: 1;
      transition: transform .15s;
    }
  .site>.stats.stats-open .stats-toggle-caret {
      transform: rotate(180deg);
    }
  .site>.stats .stats-toggle-label-short {
      display: none;
    }
  .site>.stats .stats-links {
      display: none;
      position: absolute;
      top: calc(100% + 2px);
      left: clamp(8px,2vw,22px);
      right: clamp(8px,2vw,22px);
      z-index: 30;
      grid-template-columns: repeat(3,minmax(0,1fr));
      grid-auto-flow: row;
      grid-auto-columns: minmax(0,1fr);
      grid-auto-rows: auto;
      height: auto;
      box-sizing: border-box;
      overflow-x: hidden;
      gap: 7px;
      padding: 13px;
      background: linear-gradient(145deg,#102d47,#061624);
      border: 2px solid #bc945a;
      box-shadow: 0 10px 25px #000b,inset 0 0 0 1px #426078;
      max-height: min(70vh,520px);
      overflow-y: auto;
    }
  .site>.stats.stats-open .stats-links {
      display: grid;
    }
  .site>.stats .stats-links>a {
      width: 100%;
      text-align: left;
      letter-spacing: .01em;
      background: linear-gradient(180deg,#183c56,#0c263b);
      color: #f7e0b3;
      text-shadow: 0 1px 2px #000;
      transition: background .12s,border-color .12s;
    }
  .site>.stats .stats-links>a:hover,.site>.stats .stats-links>a:focus-visible {
      background: #235171;
      border-color: #e1b66f;
      outline: 2px solid #e1b66f;
      outline-offset: 0;
    }
  .site>.stats>.language {
      right: auto !important;
      margin: 0;
    }
}
@media (max-width:750px) {
  .site>.stats .stats-links {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
  .site>.stats .stats-mobile-toggle {
      font-size: 12px;
      letter-spacing: 0;
      padding: 8px 10px;
      gap: 6px;
    }
  .site>.stats .stats-toggle-label-long {
      display: none;
    }
  .site>.stats .stats-toggle-label-short {
      display: inline;
    }
}
@media (max-width:500px) {
  .site>.stats {
      height: 54px;
      min-height: 54px;
      gap: 6px;
      padding: 0 8px;
    }
  .site>.stats>.language {
      gap: 2px;
      padding: 2px 4px;
      height: 35px;
    }
  .site>.stats>.language .lang-label {
      display: none !important;
    }
  .site>.stats>.language :is(a,button).lang-option {
      padding: 6px 5px;
      gap: 3px;
    }
  .site>.stats .stats-mobile-toggle {
      padding: 8px 7px;
      gap: 4px;
      font-size: 11px;
    }
  .site>.stats .stats-links {
      left: 7px;
      right: 7px;
      padding: 9px;
      gap: 6px;
    }
  .site>.stats .stats-links>a {
      padding: 9px;
      font-size: 12px;
    }
}
@media (max-width:370px) {
  .site>.stats>.language .lang-full {
      display: none !important;
    }
  .site>.stats>.language .lang-short {
      display: inline !important;
    }
}
.site > .stats .uoi-empty-module-slot--stats { display: block; width: 100%; min-height: 30px; }
.site > .stats .uoi-empty-module-slot--languages {
  flex: 0 0 145px;
  width: 145px;
  min-height: 30px;
  border: 1px solid rgba(187,143,76,.3);
  background: rgba(0,0,0,.22);
}
@media (max-width: 620px) {
  .site > .stats .uoi-empty-module-slot--languages { flex-basis: 72px; width:72px; }
}

/* ================ Modulo Joomla server-stats ================ */
/* UOItalia Reborn — styles normalized for 0.1.37.
   Stable cascade order, selectors, assets and active declarations retained. */

.site > .stats .stats-links .uoi-stats-item {
  text-decoration: none;
}
.site > .stats .stats-links .uoi-stats-current {
  color: #f9d998 !important;
}
.site > .stats .stats-links :is(ul, li, nav, .mod-menu, .mod-menu__sub, .mod-list, .nav, .navbar, .navbar-nav, .mod-menu__wrapper) {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.site > .stats .stats-links li::before, .site > .stats .stats-links li::after {
  content: none !important;
}
.site > .stats .stats-links a, .site > .stats .stats-links .uoi-stats-separator {
  text-decoration: none;
  overflow-wrap: normal;
  min-width: 0;
  white-space: nowrap;
  text-transform: uppercase;
}
.site > .stats .stats-links .uoi-stats-separator {
  color: #f2d79d;
  font: 700 11px Georgia,serif;
  padding: 0 8px;
}
@media (min-width:1201px) {
  /* Desktop: intrinsic label widths plus equal free space per cell. */
  .site > .stats {
    --uoi-stats-group-gap: 6px;
  }
  .site > .stats .stats-links {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    --uoi-stat-white-space: nowrap;
    --uoi-stat-divider: 0;
    container-type: inline-size;
  }
  .site > .stats > .language .lang-option {
    --uoi-stat-link-padding: 0 clamp(5px,.5vw,9px);
    gap: 5px;
    flex-shrink: 0;
  }
  .site > .stats > .language .uoi-lang-flag {
    display: block;
    flex: 0 0 auto;
    width: 19px;
    height: 13px;
    object-fit: contain;
  }
  .site > .stats .stats-links a, .site > .stats .stats-links .uoi-stats-separator {
    position: relative;
    flex: 1 0 auto !important;
    width: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(8px, .88cqi, 12px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    padding: 0 3px;
    height: auto;
    min-height: 32px;
    overflow-wrap: normal;
    text-align: center;
    color: #f4dfb2;
  }
  /* Identical free space around every label, including the longest one. */
  .site > .stats .stats-links a::after,
  .site > .stats .stats-links .uoi-stats-separator::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: #9e7c4c;
    pointer-events: none;
  }
  .site > .stats .stats-links a:hover, .site > .stats .stats-links a:focus-visible {
    color: #fff;
    text-decoration: underline;
  }
}
@media (max-width:1200px) {
  .site > .stats .stats-links a, .site > .stats .stats-links .uoi-stats-separator {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: none !important;
    width: 100%;
    height: auto;
    min-height: 43px;
    padding: 10px 12px;
    white-space: normal;
    text-align: left;
    font: 700 13px/1.3 Georgia,serif;
    background: linear-gradient(180deg,#183c56,#0c263b);
    border: 1px solid #6e624c;
    color: #f7e0b3;
  }
  .site > .stats .stats-links a:hover, .site > .stats .stats-links a:focus-visible {
    background: #235171;
    border-color: #e1b66f;
    color: #fff;
  }
}
