/* Legislation full-text viewer (hover panel + click modal) for pages that do not load
   lesson-consistency.css. Copied from lesson-consistency.css "Legislation full-text viewer"
   so case pages and menus get the same panel without the lesson page restyle. Keep in step. */
/* Themed to match the CGT legislation tooltip (css/legal-ref.css):
   white card, green left rule, uppercase act label, compact type. */
.tt-leg-panel {
  position: fixed; z-index: 9000; width: 560px; max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid rgba(44, 114, 79, 0.30);
  border-left: 4px solid #2c724f;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 0;
  font-size: 12.5px; line-height: 1.55; color: #2d3436;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tt-leg-panel .tt-leg-body { max-height: 300px; }   /* taller scroll area */
.tt-leg-panel.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tt-leg-modal-overlay {
  position: fixed; inset: 0; z-index: 6100; background: rgba(15,30,22,0.5);
  display: none; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.tt-leg-modal-overlay.is-open { display: flex; }
.tt-leg-modal {
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.32);
  width: 620px; max-width: 100%; max-height: 84vh; display: flex; flex-direction: column; overflow: hidden;
}
.tt-leg-modal .tt-leg-body { max-height: none; }
/* Header typography mirrors the CGT tooltip: small uppercase act label above a
   bold section line. */
.tt-leg-head {
  position: sticky; top: 0; background: #ffffff; z-index: 1;
  padding: 12px 15px 8px; border-bottom: 1px solid #e9f1ed;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.tt-leg-head h4 {
  margin: 0; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: #2c724f; line-height: 1.3;
}
.tt-leg-head small {
  display: block; font-size: 13px; font-weight: 700; color: #1a3a2a;
  margin-top: 4px; line-height: 1.35;
}
.tt-leg-close {
  background: #eef3f0; border: none; color: #1a3a2a; width: 22px; height: 22px;
  border-radius: 50%; cursor: pointer; flex-shrink: 0; font-size: 12px; line-height: 1;
}
/* The modal keeps the stronger green header for contrast at larger size. */
.tt-leg-modal .tt-leg-head { background: linear-gradient(135deg, #1e5c3a, #2c724f); border-bottom: none; }
.tt-leg-modal .tt-leg-head h4 { color: rgba(255,255,255,0.85); }
.tt-leg-modal .tt-leg-head small { color: #fff; }
.tt-leg-modal .tt-leg-close { background: rgba(255,255,255,0.22); color: #fff; }
.tt-leg-panel .tt-leg-close { display: none; }
.tt-leg-panel.is-pinned .tt-leg-close { display: block; }
.tt-leg-panel.is-pinned { box-shadow: 0 16px 44px rgba(20,50,35,0.3); border-color: #c9d8cf; }
.tt-leg-note {
  padding: 6px 15px; background: #f6faf8; border-bottom: 1px solid #eef3f0;
  font-size: 11px; color: #6b7670; font-weight: 600;
}
.tt-leg-note b { color: #b5641f; }
/* Amendment banner: what changed, by which Act, from when. */
.tt-leg-amend {
  margin: 10px 15px 4px;
  padding: 9px 11px;
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #6b4a12;
}
.tt-leg-amend b { color: #8a5a15; }
.tt-leg-amend__tag {
  display: inline-block;
  background: #c97a37;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 7px;
}
.tt-leg-amend__more { margin-top: 5px; }
.tt-leg-amend__more > summary {
  cursor: pointer; font-style: italic; color: #8a5a15;
  list-style: none; outline: none; padding: 1px 0;
}
.tt-leg-amend__more > summary::-webkit-details-marker { display: none; }
.tt-leg-amend__more > summary::before { content: "▸ "; font-style: normal; }
.tt-leg-amend__more[open] > summary::before { content: "▾ "; }
.tt-leg-amend__more[open] > summary { margin-bottom: 4px; }
.tt-leg-amend__asat {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #f0d9a8;
  font-style: italic;
  color: #8a7350;
}

.tt-leg-body { padding: 12px 15px 14px; overflow-y: auto; position: relative; }
.tt-leg-modal .tt-leg-body { flex: 1; max-height: 70vh; }
.tt-leg-block {
  font-size: 12.7px; line-height: 1.55; color: #2a3530; margin: 0 0 9px;
  padding: 3px 6px; border-radius: 6px;
}
.tt-leg-block .tt-leg-id { font-weight: 700; color: #1a5038; margin-right: 5px; }
.tt-leg-block.is-target { background: #fff2cf; box-shadow: inset 3px 0 0 #c97a37; }
.tt-leg-block.is-target .tt-leg-id { color: #b5641f; }

.tt-leg-panel, .tt-leg-panel *, .tt-leg-modal, .tt-leg-modal * { border-radius: 0 !important; }
