.form-preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  overflow-y: auto;
}

.preview-form {
  width: 100%;
  max-width: 99%;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 20px  rgba(0, 0, 0, 0.2);
}

.form-header {
  margin-bottom: 30px;
}

.form-header h1 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 28px !important;
}

.form-header p {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.form-field .field-label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.required {
  color: #f56565;
  margin-left: 4px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  margin: 0;
  font-weight: normal;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"],
.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  accent-color: #667eea !important;
  border: 1px solid #ddd !important;
  background: white !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
}

.radio-label input[type="radio"]:checked,
.checkbox-label input[type="checkbox"]:checked,
.form-field input[type="radio"]:checked,
.form-field input[type="checkbox"]:checked {
  background-color: #667eea !important;
  border-color: #667eea !important;
  background-image: none !important;
}

.form-field table input[type="radio"],
.form-field table input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.form-field table input[type="radio"]:checked,
.form-field table input[type="checkbox"]:checked {
  background-color: #667eea !important;
  border-color: #667eea !important;
}

.submit-btn {
  /* width: 100%; */
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.empty-form {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #48bb78;
  color: white;
  padding: 16px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.info-icon:hover .info-tooltip {
  opacity: 1;
  visibility: visible;
}

.info-icon {
  transition: all 0.2s ease;
}

.info-icon:hover {
  background-color: #3182ce;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(66, 153, 225, 0.4);
}

.error-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffe5e5;
  border: 1px solid #f5c2c2;
  color: #b91c1c;
  font-size: 14px;
}

.field-error {
  color: #e53e3e;
  font-size: 14px;
  margin-top: 4px;
  font-weight: 500;
}

.form-field.error input,
.form-field.error textarea,
.form-field.error select {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.field-error-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #ffe5e5;
  border: 1px solid #f5c2c2;
  color: #b91c1c;
  font-size: 13px;
}

.field-error-icon {
  color: #b91c1c;
  font-weight: 700;
}

.required {
  color: #e53e3e;
  margin-left: 4px;
}
/* Main Wrapper */
.quill-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: visible; /* allow toolbar/dropdowns to show */
  background: #fff;
  font-family: Arial, sans-serif;
}

/* Toolbar */
.quill-wrapper .ql-toolbar {
  border: none !important;
  border-bottom: 1px solid #eee !important;
  background: #fafafa;
  z-index: 3;
}

/* Container */
.quill-wrapper .ql-container {
  border: none !important;
  min-height: 220px;          /* ensure room to edit */
  max-height: 400px;          /* constrain editor body */
  overflow-y: auto;           /* scroll content, keep toolbar visible */
}

/* Editor Area */
.quill-wrapper .ql-editor {
  min-height: 220px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
}

/* Fix dropdown font size */
.quill-wrapper .ql-picker-label {
  font-size: 14px;
}

/* Fix focus outline */
.quill-wrapper .ql-container.ql-snow:focus-within {
  box-shadow: 0 0 0 2px rgba(25,118,210,0.15);
}
.field-component {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  transition: all 0.2s ease;
}

.field-component:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.field-component.selected {
  border-color: #667eea;
  background: #f8faff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.field-label {
  margin: 0;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.required-badge {
  color: #f56565;
  margin-left: 4px;
}

.delete-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: #fee;
  color: #f56565;
}

.field-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-preview input,
.field-preview textarea,
.field-preview select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
}

.field-preview input[type="radio"],
.field-preview input[type="checkbox"],
.field-preview table input[type="radio"],
.field-preview table input[type="checkbox"] {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border: none !important;
  margin-right: 6px !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  accent-color: #667eea !important;
  cursor: pointer !important;
}

.field-preview input:disabled,
.field-preview textarea:disabled,
.field-preview select:disabled {
  background-color: #f8f9fa;
  color: #999;
  cursor: not-allowed;
}
.drag-zone-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.drag-zone-wrapper h2 {
  margin: 0;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
  color: #333;
  font-size: 16px !important;
}

.drag-zone {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fafbfc;
}

.drag-zone.dragging-over {
  background: #f0f4ff;
  border: 2px dashed #667eea;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-style: italic;
  text-align: center;
}

.field-item-wrapper {
  margin-bottom: 15px;
  padding: 2px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.field-item-wrapper:hover {
  background: rgba(102, 126, 234, 0.05);
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.field-item-wrapper.selected {
  background: rgba(102, 126, 234, 0.15);
  border: 2px solid #667eea;
}
.field-palette {
  width: 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.field-palette h2 {
  margin: 0;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
  color: #333;
  font-size: 16px !important;
}

/* Reduce padding for accordion header/title */
.field-palette h2.accordion-header {
  padding: 0;
  background: transparent;
  border-bottom: none;
}

/* Tighten accordion button spacing */
.field-palette .accordion-button { padding: 6px 10px; font-size: 14px; }

/* Remove extra padding inside accordion body for removed fields list */
.field-palette .accordion-body { padding: 6px; }

/* Remove extra margins on accordion container */
.field-palette .accordion { margin: 0; }
.field-palette .accordion-item { border: none; }

/* Make removed section even tighter */
.field-palette .removed-tips { padding: 6px 8px; }
.field-palette .removed-items { padding: 4px; gap: 4px; }

.palette-items {
  flex: 1;
  padding: 5px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  border: 1px solid #ddd;
  color: #555;
  border-radius: 4px;
  cursor: move;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.palette-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(191 191 191 / 30%);
}

.palette-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.field-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.field-name {
  font-weight: 500;
  font-size: 13px;
}

.palette-tips {
  padding: 12px 15px;
  background: #f0f4ff;
  border-top: 1px solid #e2e8f0;
  color: #667eea;
  font-size: 12px;
  line-height: 1.4;
}

.palette-tips p {
  margin: 0;
}

/* Scrollbar styling */
.palette-items::-webkit-scrollbar {
  width: 6px;
}

.palette-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.palette-items::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.palette-items::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}
.form-preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  overflow-y: auto;
}

.preview-form {
  width: 100%;
  max-width: 99%;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 20px  rgba(0, 0, 0, 0.2);
}

.form-header {
  margin-bottom: 30px;
}

.form-header h1 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 28px !important;
}

.form-header p {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.form-field .field-label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.required {
  color: #f56565;
  margin-left: 4px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  margin: 0;
  font-weight: normal;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"],
.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  accent-color: #667eea !important;
  border: 1px solid #ddd !important;
  background: white !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
}

.radio-label input[type="radio"]:checked,
.checkbox-label input[type="checkbox"]:checked,
.form-field input[type="radio"]:checked,
.form-field input[type="checkbox"]:checked {
  background-color: #667eea !important;
  border-color: #667eea !important;
  background-image: none !important;
}

.form-field table input[type="radio"],
.form-field table input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.form-field table input[type="radio"]:checked,
.form-field table input[type="checkbox"]:checked {
  background-color: #667eea !important;
  border-color: #667eea !important;
}

.submit-btn {
  /* width: 100%; */
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.empty-form {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #48bb78;
  color: white;
  padding: 16px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
  animation: slideIn 0.3s ease;
  z-index: 9999;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.info-icon:hover .info-tooltip {
  opacity: 1;
  visibility: visible;
}

.info-icon {
  transition: all 0.2s ease;
}

.info-icon:hover {
  background-color: #3182ce;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(66, 153, 225, 0.4);
}

.error-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffe5e5;
  border: 1px solid #f5c2c2;
  color: #b91c1c;
  font-size: 14px;
}

.field-error {
  color: #e53e3e;
  font-size: 14px;
  margin-top: 4px;
  font-weight: 500;
}

.form-field.error input,
.form-field.error textarea,
.form-field.error select {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.field-error-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #ffe5e5;
  border: 1px solid #f5c2c2;
  color: #b91c1c;
  font-size: 13px;
}

.field-error-icon {
  color: #b91c1c;
  font-weight: 700;
}

.required {
  color: #e53e3e;
  margin-left: 4px;
}
.form-settings {
  width: 320px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.settings-section {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px !important;
}

.setting-group {
  margin-bottom: 15px;
}

.setting-group h4{  
  margin: 0 0 10px 0;
  font-size: 14px !important;  
  
}


.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #555;
  font-size: 13px;
}

.setting-group input[type="text"],
.setting-group input[type="email"],
.setting-group input[type="number"],
 .setting-group input[type="date"],
.setting-group textarea,
.setting-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}

 

.setting-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #667eea !important;
    border: 1px solid #ddd !important;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    flex-shrink: 0 !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    margin-right: 5px !important;
}
.setting-group input:focus,
.setting-group textarea:focus,
.setting-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  width: auto;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.option-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.option-item input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.remove-option-btn {
  background: #fee;
  color: #f56565;
  border: 1px solid #fcc;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.remove-option-btn:hover {
  background: #fdd;
  border-color: #f99;
}

.btn-add-option {
  width: 100%;
  padding: 8px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-add-option:hover {
  background: #5568d3;
}

.no-selection {
  text-align: center;
  color: #999;
  margin: 0;
  font-style: italic;
  font-size: 14px;
}

.field-settings {
  background: #f8faff;
}

/* Scrollbar styling */
.form-settings::-webkit-scrollbar {
  width: 6px;
}

.form-settings::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.form-settings::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.form-settings::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}
.app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafa;
}

.app-header {
  background: white;
  border-bottom: 0px solid white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left h1 {
  margin: 0;
  color: #667eea;
  font-size: 28px;
}

.subtitle {
  margin: 4px 0 0 0;
  color: #999;
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
}

.btn-info {
  background: #4299e1;
  color: white;
}

.btn-info:hover {
  background: #3182ce;
}

.btn-danger {
  background: #f56565;
  color: white;
}

.btn-danger:hover {
  background: #e53e3e;
}

.app-container {
  display: flex;
  flex: 1;
  gap: 20px;
  padding: 20px;
  overflow: hidden;
}

.main-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
