html {
  scroll-behavior: smooth;
}


.gloss-term {
  position: relative;
  cursor: pointer;
  text-decoration: underline dotted;
}

.gloss-popup {
  display: none;
  position: absolute;
  left: 0;
  top: 120%;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 12px;
  width: 260px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 999;
}

.gloss-term:hover .gloss-popup {
  display: block;
}


/* --- Omeobox Glossary Modal --- */
.obx-gloss-link {
  text-decoration: underline dotted;
  cursor: help;
}

.obx-gloss-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  z-index: 99999;
}

.obx-gloss-modal {
  position: fixed;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.25);
  display: none;
  z-index: 100000;
}

.obx-gloss-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.obx-gloss-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.obx-gloss-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.obx-gloss-modal-body {
  padding: 14px 16px 16px;
  font-size: 15px;
  line-height: 1.5;
}

.obx-gloss-modal-footer {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.obx-gloss-more {
  text-decoration: underline;
}

/* Stato aperto */
.obx-gloss-open .obx-gloss-overlay,
.obx-gloss-open .obx-gloss-modal {
  display: block;
}

/* Mobile: un filo più in alto e più aria */
@media (max-width: 480px) {
  .obx-gloss-modal {
    top: 8%;
  }
}
