/* Shared demo modal — layout fixes */
#demoModal.demo-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#demoModal.demo-modal-root.is-visible {
  opacity: 1;
}
#demoModal.demo-modal-root.is-open {
  display: flex;
}
#demoModal .demo-modal-card {
  position: relative;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 960px;
  max-height: min(760px, calc(100vh - 32px));
  height: auto;
  min-height: min(640px, calc(100vh - 32px));
  margin: auto;
  background: #fff;
  border-radius: 20px;
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
#demoModal.demo-modal-root.is-visible .demo-modal-card {
  transform: scale(1);
}
#demoModal .demo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 50;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
#demoModal .demo-modal-close:hover {
  background: #5b3df5;
  color: #fff;
}
#demoModal .demo-modal-aside {
  width: 38%;
  flex-shrink: 0;
  background: linear-gradient(180deg, #5b3df5 0%, #7b61ff 100%);
  color: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  border: none;
  outline: none;
}
#demoModal .demo-modal-form-wrap {
  width: 62%;
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
#demoModal #formHeader {
  margin-bottom: 18px;
  padding-right: 40px;
  flex-shrink: 0;
}
#demoModal #demoForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  flex: 1;
}
#demoModal .demo-row {
  display: flex;
  gap: 16px;
}
#demoModal .demo-field {
  flex: 1;
  min-width: 0;
}
#demoModal .demo-field label,
#demoModal .demo-field-full label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}
#demoModal .demo-field input,
#demoModal .demo-field select,
#demoModal .demo-field-full input,
#demoModal .demo-field-full select,
#demoModal .demo-field-full textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0 12px;
  font-size: 14px;
  color: #1f2937;
  outline: none;
  background: #f9fafb;
  box-sizing: border-box;
}
#demoModal .demo-field input,
#demoModal .demo-field select,
#demoModal .demo-field-full select {
  height: 44px;
}
#demoModal .demo-field-full {
  display: block;
  width: 100%;
  position: relative;
  z-index: 1;
}
#demoModal .demo-field-full textarea {
  padding: 10px 12px;
  resize: none;
  min-height: 72px;
  display: block;
  margin: 0 0 4px;
}
#demoModal .demo-field input:focus,
#demoModal .demo-field select:focus,
#demoModal .demo-field-full input:focus,
#demoModal .demo-field-full select:focus,
#demoModal .demo-field-full textarea:focus {
  border-color: #5b3df5 !important;
  box-shadow: 0 0 0 3px rgba(91, 61, 245, 0.15) !important;
  background: #fff !important;
}
#demoModal .demo-kvkk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
  padding: 4px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  position: relative;
  z-index: 2;
  isolation: isolate;
}
#demoModal .demo-kvkk input {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  margin: 2px 0 0;
  padding: 0;
  cursor: pointer;
  accent-color: #5b3df5;
  flex-shrink: 0;
  position: static;
  float: none;
}
#demoModal .demo-kvkk label {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: block;
  position: static;
}
#demoModal .demo-kvkk label a {
  color: #5b3df5;
  font-weight: 600;
  text-decoration: underline;
}
#demoModal #submitBtn {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: #5b3df5 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.25);
  margin-top: 8px;
  flex-shrink: 0;
}
#demoModal #submitBtn:hover {
  background: #4a2ee0 !important;
}
#demoModal #successState {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  margin: auto;
}
html.demo-modal-lock,
body.demo-modal-lock,
html.offcanvas-lock,
body.offcanvas-lock {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none;
}

@keyframes demo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#demoModal .animate-spin {
  animation: demo-spin 1s linear infinite;
}

@media (max-width: 860px) {
  #demoModal .demo-modal-card {
    flex-direction: column;
    max-height: calc(100vh - 24px);
    min-height: 0;
    height: auto;
  }
  #demoModal .demo-modal-aside {
    width: 100%;
    padding: 20px 20px 16px;
  }
  #demoModal .demo-modal-aside .demo-aside-features,
  #demoModal .demo-modal-aside .demo-aside-badge {
    display: none;
  }
  #demoModal .demo-modal-form-wrap {
    width: 100%;
    padding: 22px 18px 18px;
  }
  #demoModal .demo-row {
    flex-direction: column;
    gap: 14px;
  }
  #demoModal #demoForm {
    gap: 14px;
  }
}
