/* Legalo enterprise-demo modal. All selectors are isolated under #DEMO. */

#DEMO {
  --dm-bg: #080c14;
  --dm-panel: #0d131e;
  --dm-panel-soft: #101925;
  --dm-border: rgba(201, 168, 76, 0.2);
  --dm-border-soft: rgba(255, 255, 255, 0.1);
  --dm-gold: var(--gold, #c9a84c);
  --dm-gold-hi: var(--gold-hi, #e0c26c);
  --dm-text: var(--ivory, #f4f0e7);
  --dm-muted: var(--stone, #a9a7a1);
  --dm-dim: var(--slate, #747b87);
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.5vw, 32px);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(201, 168, 76, 0.11),
      transparent 34%
    ),
    rgba(3, 6, 11, 0.88);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#DEMO[aria-hidden="false"],
#DEMO.is-open,
#DEMO.open,
#DEMO.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.demo-open,
body.modal-open,
body:has(#DEMO[aria-hidden="false"]) {
  overflow: hidden;
}

#DEMO,
#DEMO * {
  box-sizing: border-box;
}

#DEMO .demo-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(440px, 1.28fr);
  grid-template-rows: minmax(0, 1fr);
  width: min(1080px, 100%);
  height: min(820px, calc(100dvh - clamp(24px, 5vw, 64px)));
  min-height: 0;
  max-height: calc(100dvh - clamp(24px, 5vw, 64px));
  overflow: hidden;
  color: var(--dm-text);
  background: var(--dm-panel);
  border: 1px solid var(--dm-border);
  border-radius: 18px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.64);
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease;
}

#DEMO[aria-hidden="false"] .demo-modal,
#DEMO.is-open .demo-modal,
#DEMO.open .demo-modal,
#DEMO.active .demo-modal {
  transform: translateY(0) scale(1);
}

#DEMO .dm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--dm-muted);
  font:
    500 18px/1 Arial,
    sans-serif;
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid var(--dm-border-soft);
  border-radius: 50%;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

#DEMO .dm-close:hover {
  color: var(--dm-text);
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--dm-border);
  transform: rotate(4deg);
}

#DEMO .dm-close:focus-visible,
#DEMO :is(input, select, textarea, button, a):focus-visible {
  outline: 2px solid var(--dm-gold);
  outline-offset: 3px;
}

#DEMO .dm-info {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(32px, 4vw, 58px) clamp(26px, 3.5vw, 48px);
  overflow: auto;
  background:
    linear-gradient(155deg, rgba(201, 168, 76, 0.09), transparent 45%),
    var(--dm-bg);
  border-right: 1px solid var(--dm-border-soft);
}

#DEMO .dm-info::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dm-gold), transparent 75%);
}

#DEMO .dm-info .section-meta {
  color: var(--dm-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#DEMO .dm-info .sec-h {
  color: var(--dm-text);
  line-height: 1.12;
}

#DEMO .dm-info .sec-h em {
  color: var(--dm-gold);
  font-style: normal;
}

#DEMO .dm-info .sec-p {
  max-width: 42ch;
  color: var(--dm-muted);
  line-height: 1.75;
}

#DEMO .dm-promises {
  display: grid;
  gap: 0;
  margin-top: clamp(28px, 4vh, 44px);
}

#DEMO .dm-promise {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 17px 0;
  border-top: 1px solid var(--dm-border-soft);
}

#DEMO .dm-promise:last-child {
  border-bottom: 1px solid var(--dm-border-soft);
}

#DEMO .dm-pn {
  padding-top: 2px;
  color: var(--dm-gold);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 9px;
  letter-spacing: 0.05em;
}

#DEMO .dm-pt {
  color: var(--dm-text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}

#DEMO .dm-pd {
  margin-top: 5px;
  color: var(--dm-dim);
  font-size: 11px;
  line-height: 1.6;
}

#DEMO .dm-form {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: clamp(32px, 4vw, 54px) clamp(24px, 4vw, 52px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  background: var(--dm-panel);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.38) transparent;
}

#DEMO .dm-form::-webkit-scrollbar {
  width: 8px;
}

#DEMO .dm-form::-webkit-scrollbar-track {
  background: transparent;
}

#DEMO .dm-form::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.38);
  border: 2px solid var(--dm-panel);
  border-radius: 999px;
}

#DEMO .dm-form::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.62);
}

#DEMO .dm-form h3 {
  margin: 0 48px 26px 0;
  color: var(--dm-text);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 600;
  line-height: 1.25;
}

#DEMO .f-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#DEMO .fg {
  min-width: 0;
  margin-bottom: 15px;
}

#DEMO .fl {
  display: block;
  margin-bottom: 7px;
  color: var(--dm-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-transform: uppercase;
}

#DEMO :is(.fi, .fs) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 11px 13px;
  color: var(--dm-text);
  font: 400 13px/1.4 var(--sans, Inter, system-ui, sans-serif);
  color-scheme: dark;
  background: rgba(3, 7, 13, 0.55);
  border: 1px solid var(--dm-border-soft);
  border-radius: 8px;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

#DEMO :is(.fi, .fs):hover {
  border-color: rgba(201, 168, 76, 0.3);
}

#DEMO :is(.fi, .fs):focus {
  background: rgba(3, 7, 13, 0.82);
  border-color: var(--dm-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

#DEMO :is(.fi, .fs)::placeholder {
  color: #686f7b;
  opacity: 1;
}

#DEMO .fs {
  padding-right: 38px;
  cursor: pointer;
}

#DEMO textarea.fi {
  min-height: 108px;
  resize: vertical;
}

#DEMO .f-note {
  margin: -3px 0 15px;
  color: var(--dm-dim);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 9.5px;
  line-height: 1.55;
}

#DEMO .f-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 20px;
  color: #0a0d12;
  font: 750 11px/1.2 var(--sans, Inter, system-ui, sans-serif);
  letter-spacing: 0.075em;
  text-transform: uppercase;
  background: var(--dm-gold);
  border: 1px solid var(--dm-gold);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

#DEMO .f-submit:hover:not(:disabled) {
  background: var(--dm-gold-hi);
  border-color: var(--dm-gold-hi);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.18);
  transform: translateY(-1px);
}

#DEMO .f-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

#DEMO #form-note-default {
  margin: 10px 0 0;
  text-align: center;
}

#DEMO #form-error,
#DEMO #form-success {
  border-radius: 8px;
}

@media (max-width: 820px) {
  #DEMO {
    place-items: center;
    padding: 12px;
    overflow: hidden;
  }

  #DEMO .demo-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - 24px);
    min-height: 0;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    border-radius: 14px;
  }

  #DEMO .dm-info {
    max-height: 42dvh;
    padding: 34px 24px 28px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--dm-border-soft);
  }

  #DEMO .dm-promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    margin-top: 24px;
  }

  #DEMO .dm-promise:last-child {
    border-bottom: 0;
  }

  #DEMO .dm-form {
    min-height: 0;
    max-height: none;
    padding: 30px 24px 34px;
    overflow-y: auto;
  }
}

@media (max-width: 560px) {
  #DEMO {
    padding: 0;
    background: var(--dm-panel);
  }

  #DEMO .demo-modal {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #DEMO .dm-close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }

  #DEMO .dm-info {
    max-height: 34dvh;
    padding: calc(36px + env(safe-area-inset-top)) 20px 26px;
  }

  #DEMO .dm-info .sec-h {
    padding-right: 42px;
  }

  #DEMO .dm-promises,
  #DEMO .f-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #DEMO .dm-promises {
    margin-top: 22px;
  }

  #DEMO .dm-promise {
    padding: 14px 0;
  }

  #DEMO .dm-promise:last-child {
    border-bottom: 1px solid var(--dm-border-soft);
  }

  #DEMO .dm-form {
    min-height: 0;
    padding: 28px 20px calc(36px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  #DEMO :is(.fi, .fs) {
    min-height: 48px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #DEMO,
  #DEMO .demo-modal,
  #DEMO .dm-close,
  #DEMO .f-submit {
    scroll-behavior: auto;
    transition: none;
  }
}
