/* Shared demo modal styles for public marketing pages */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-elevated, #fff);
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal::-webkit-scrollbar { display: none; }
.modal-overlay.active .modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.modal-header {
  padding: 32px 32px 0;
  text-align: center;
}
.modal-header h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.modal-header p {
  color: var(--text-secondary, #52525b);
  font-size: 0.9375rem;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border, #e4e4e7);
  background: var(--bg-elevated, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover {
  border-color: var(--text, #09090b);
  background: var(--text, #09090b);
  color: var(--bg, #fafafa);
}
.modal-close svg {
  width: 16px;
  height: 16px;
}
.modal-body {
  padding: 28px 32px 32px;
}
.demo-form-group {
  margin-bottom: 20px;
}
.demo-form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text, #09090b);
  margin-bottom: 8px;
}
.demo-form-group label .required {
  color: #ef4444;
}
.demo-form-input,
.demo-form-select,
.demo-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border, #e4e4e7);
  border-radius: 12px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--bg, #fafafa);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-form-input:focus,
.demo-form-select:focus,
.demo-form-textarea:focus {
  border-color: #09090b;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.1);
}
.demo-form-input::placeholder,
.demo-form-textarea::placeholder {
  color: var(--text-tertiary, #a1a1aa);
}
.demo-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.demo-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.demo-form-textarea {
  resize: vertical;
  min-height: 80px;
}
.modal-footer {
  padding: 0 32px 32px;
}
.modal-submit {
  width: 100%;
  padding: 14px 24px;
  background: #9d59e1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.modal-submit:hover {
  background: #8c4fd0;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(157, 89, 225, 0.4);
}
.modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.modal-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-tertiary, #a1a1aa);
}
.modal-note a {
  color: var(--text, #09090b);
  text-decoration: underline;
}
.modal-success {
  text-align: center;
  padding: 48px 32px;
}
.modal-success-icon {
  width: 64px;
  height: 64px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.modal-success-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}
.modal-success h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  margin-bottom: 12px;
}
.modal-success p {
  color: var(--text-secondary, #52525b);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .demo-form-row { grid-template-columns: 1fr; }
  .modal { width: 95%; max-height: 90vh; margin: 20px auto; }
  .modal-header, .modal-body, .modal-footer { padding-left: 20px; padding-right: 20px; }
  .modal-header { padding-top: 24px; }
  .modal-header h2 { font-size: 1.5rem; }
  .modal-body { padding-top: 20px; padding-bottom: 20px; }
  .demo-form-group { margin-bottom: 16px; }
  .demo-form-input, .demo-form-select, .demo-form-textarea { padding: 10px 14px; font-size: 16px; }
  .g-recaptcha { transform: scale(0.9); transform-origin: center; }
  .modal-submit { padding: 12px 20px; }
  .modal-footer { padding-bottom: 24px; }
}
@media (max-width: 400px) {
  .modal { width: 100%; max-height: 100vh; border-radius: 0; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .g-recaptcha { transform: scale(0.77); transform-origin: center; }
}
