/* Modal window for the legal pages (js/legal_modal.js), colors from the theme variables in main.css */
html.legal-modal-open, html.legal-modal-open body { overflow: hidden; }

.legal-modal-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lc-overlay);
}

.legal-modal-dialog {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 56rem;
  max-width: 94vw;
  height: 85vh;
  background: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  box-shadow: 0 10px 40px var(--lc-shadow);
  overflow: hidden;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--lc-surface-2);
  border-bottom: 2px solid var(--lc-accent);
  font: bold 16px/1.4 Arial, Helvetica, sans-serif;
  color: var(--lc-text);
}

/* Page styles (e.g. testLogin.css) give buttons a fixed width: reset everything the close button relies on */
.legal-modal-dialog .legal-modal-close {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0 0 0 1rem;
  box-shadow: none;
  text-transform: none;
  padding: 0 0.5rem;
  background: none;
  border: 0;
  font: 28px/1 Arial, Helvetica, sans-serif;
  color: var(--lc-text-muted);
  cursor: pointer;
}

.legal-modal-dialog .legal-modal-close:hover, .legal-modal-dialog .legal-modal-close:focus { color: var(--lc-text); background: none; }

.legal-modal-title { flex: 1 1 auto; }

.legal-modal-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: var(--lc-surface);
}

@media (max-width: 40rem) {
  .legal-modal-dialog { width: 100vw; max-width: 100vw; height: 100vh; border-radius: 0; }
}
