/**
 * HPP Legal overlay — v1 two-column panel on top of lobby (ported from app.css hpp-legal-*).
 */

.oss-hpp-legal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  box-sizing: border-box;
  background: var(--hpp-lobby-scrim);
}

.oss-hpp-legal[hidden] {
  display: none !important;
}

.oss-hpp-legal__panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--hpp-lobby-border);
  background: #f5f5f5;
  color: #1a1a1a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.oss-hpp-legal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.55rem 2.25rem 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.oss-hpp-legal__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #160c2b;
  text-align: center;
}

.oss-hpp-legal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(22, 12, 43, 0.25);
  border-radius: 4px;
  background: transparent;
  color: #160c2b;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.oss-hpp-legal__close:hover {
  border-color: rgba(22, 12, 43, 0.55);
  background: rgba(22, 12, 43, 0.06);
}

.oss-hpp-legal__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.oss-hpp-legal .hpp-legal-two-col {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.oss-hpp-legal .hpp-legal-nav {
  flex: 0 0 33%;
  width: 33%;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  overflow-y: auto;
  min-width: 0;
}

.oss-hpp-legal .hpp-legal-nav-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #0a0a0a;
}

.oss-hpp-legal .hpp-legal-toc ul {
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
  line-height: 1.5;
}

.oss-hpp-legal .hpp-legal-toc ul li {
  margin: 0.15em 0;
}

.oss-hpp-legal .hpp-legal-toc a {
  color: #2d2d2d;
  text-decoration: none;
  font-size: 0.85rem;
}

.oss-hpp-legal .hpp-legal-toc a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.oss-hpp-legal .hpp-legal-doc {
  flex: 1 1 67%;
  width: 67%;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.25rem;
}

.oss-hpp-legal .hpp-legal-body section {
  margin-bottom: 1.25rem;
}

.oss-hpp-legal .hpp-legal-body h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: #0a0a0a;
}

.oss-hpp-legal .hpp-legal-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
  color: #0a0a0a;
}

.oss-hpp-legal .hpp-legal-body p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1a1a1a;
}

.oss-hpp-legal .hpp-legal-body a {
  color: #1f1f1f;
  text-decoration: underline;
}

.oss-hpp-legal .hpp-legal-body a:hover {
  color: #0a0a0a;
}

.oss-hpp-legal .hpp-legal-body ul,
.oss-hpp-legal .hpp-legal-body ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding-left: 1rem;
  color: #1a1a1a;
}

.oss-hpp-legal .hpp-legal-body li {
  margin: 0.2em 0;
  color: #1a1a1a;
}

.oss-hpp-legal .hpp-legal-body li::marker {
  color: #1a1a1a;
}

.oss-hpp-legal .hpp-legal-body em {
  color: #1a1a1a;
}

.oss-hpp-legal .hpp-legal-section-divider {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1.25rem 0;
}

.oss-hpp-legal .hpp-legal-download-row {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.oss-hpp-legal .hpp-legal-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #5836b5;
  text-decoration: none;
}

.oss-hpp-legal .hpp-legal-download:hover {
  text-decoration: underline;
}

.oss-hpp-legal .hpp-legal-sidebar-external {
  margin: 0.55rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #2d2d2d;
}

.oss-hpp-legal .hpp-legal-sidebar-external-link {
  color: #5836b5;
  text-decoration: none;
  font-weight: 600;
}

.oss-hpp-legal .hpp-legal-sidebar-external-link:hover {
  text-decoration: underline;
}

.oss-hpp-legal .hpp-legal-footer-line {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #555;
}

.oss-hpp-legal .hpp-legal-thumbnails {
  flex: 1;
  min-height: 0;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 720px) {
  .oss-hpp-legal .hpp-legal-two-col {
    flex-direction: column;
  }

  .oss-hpp-legal .hpp-legal-nav,
  .oss-hpp-legal .hpp-legal-doc {
    width: 100%;
    flex: 1 1 auto;
    max-height: 42%;
  }

  .oss-hpp-legal .hpp-legal-doc {
    max-height: none;
  }
}
