/* lex-referinte.css — citari legislative clickabile + stiva de modale.
   Cutia modalului foloseste clasele Bootstrap ale temei (modal-dialog/
   modal-content/modal-header...) → stilul vine din tema; aici raman doar:
   citarea .lex-ref, overlay-ul/stivuirea (tema nu suporta modale stivuite),
   stilurile de continut (alineate/litere) si full-screen pe mobil. */

/* citarea in text */
.lex-ref {
  color: #1d4ed8;
  border-bottom: 1px dashed rgba(29, 78, 216, .45);
  cursor: pointer;
  transition: background .15s;
}
.lex-ref:hover { background: rgba(29, 78, 216, .08); }
/* referinta in afara materiei — discreta, dar tot clickabila (modal onest) */
.lex-ref[data-cheie=""] { color: #64748b; border-bottom-color: rgba(100, 116, 139, .4); }

/* overlay per nivel (backdrop + centrare); z-index-ul vine inline din JS */
.lex-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; /* fallback iOS<14.5 */
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .55);
}
/* anulam marginile/latimea responsive ale .modal-dialog (suntem in flex) */
.lex-modal .lex-dialog { margin: 0; width: min(860px, 96vw); }
.lex-modal .modal-content { border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .5); }
.lex-modal .lex-body { max-height: 64vh; overflow: auto; font-size: 14px; line-height: 1.55; }
/* chip "← Ln" — colorat cu culoarea nivelului la care intoarce (inline din JS) */
.lex-modal .lex-back {
  float: right; margin: -2px 10px 0 0;
  border: 0; border-radius: 7px; cursor: pointer;
  color: #fff; font-weight: 700; font-size: 12.5px;
  padding: 4px 11px; line-height: 1.4;
  transition: filter .15s;
}
.lex-modal .lex-back:hover { filter: brightness(1.15); }

/* badge nivel (L2, L3...) in titlu */
.lex-badge {
  color: #fff; font-weight: 700; font-size: 11px;
  padding: 2px 8px; border-radius: 7px; letter-spacing: .2px; vertical-align: middle;
}

/* continut articol */
.lex-lead { font-weight: 700; margin-bottom: 12px; font-size: 14.5px; }
.lex-artnum { color: #1d4ed8; }
.lex-chip {
  display: inline-block; background: #eef2ff; color: #3730a3;
  font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; margin-left: 4px;
}
.lex-note { font-size: 12.5px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 4px 8px; margin-bottom: 10px; }
.lex-aln { margin-top: 9px; }
.lex-lit { margin-top: 4px; margin-left: 26px; }
.lex-txt { margin-top: 9px; }
.lex-muted { color: #64748b; font-style: italic; }
.lex-foot { text-align: right; }
.lex-golink {
  font-size: 13px; color: #1d4ed8; text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; margin-left: 16px;
}
.lex-golink:hover { text-decoration: underline; }
.lex-cta { background: #1d4ed8; color: #fff; padding: 7px 14px; border-radius: 6px; }
.lex-cta:hover { text-decoration: none; color: #fff; filter: brightness(1.08); }

/* mobil: full-screen */
@media (max-width: 640px) {
  .lex-modal { padding: 0; align-items: stretch; }
  .lex-modal .lex-dialog { width: 100%; transform: none !important; }
  .lex-modal .modal-content { height: 100%; border-radius: 0; display: flex; flex-direction: column; }
  .lex-modal .lex-body { flex: 1; max-height: none; }
}
