/* Molecule Technologies - Subpages Demo Modal Popup */
.demo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 23, 54, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.demo-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.demo-modal-card {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(11, 23, 54, 0.3);
  padding: 36px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.demo-modal-overlay.active .demo-modal-card {
  transform: translateY(0) scale(1);
}
.demo-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.demo-modal-close:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.demo-modal-header {
  margin-bottom: 24px;
}
.demo-modal-header .pill {
  font-size: 12px;
  margin-bottom: 8px;
}
.demo-modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.demo-modal-header p {
  font-size: 14px;
  color: var(--body);
}
.demo-modal-form .lf {
  margin-bottom: 14px;
}
.demo-modal-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.demo-modal-form input,
.demo-modal-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
.demo-modal-form input:focus,
.demo-modal-form select:focus {
  background: #fff;
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 40, 90, 0.1);
}
.demo-modal-form .err { color: #B42318; font-size: 13px; min-height: 18px; margin: 2px 0 0; }
.demo-modal-form .ok { background: #ECFDF5; color: #047857; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; text-align: center; }
.demo-modal-form .ok.err, .demo-modal-form p[role="status"].err { background: #FEE4E2; color: #B42318; border: 1px solid #FECDCA; }

@media (max-width: 540px) {
  .demo-modal-overlay {
    padding: 12px;
  }
  .demo-modal-card {
    padding: 28px 20px 24px;
    border-radius: 20px;
  }
  .demo-modal-header h3 {
    font-size: 20px;
  }
  .demo-modal-close {
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
