/* .node-card {
  border: 1px solid #ccc;
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin: 8px auto;
  width: 300px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.children-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: 20px;
}



.children {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}


.connector-line {
  position: absolute;
  top: -30px;
  height: 100px;
  width: 100%;
} */


/* visual-site-editor.component.scss */
/* 
.visual-editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: #f5f5f5;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  
  h2 {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
    color: #333;
  }
  
  .actions {
    display: flex;
    gap: 10px;
  }
}

.json-input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 32px;
  
  .card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    padding: 24px;
    
    h3 {
      margin-top: 0;
      margin-bottom: 16px;
      font-weight: 600;
      font-size: 16px;
      color: #333;
    }
    
    .json-textarea {
      width: 100%;
      height: 300px;
      padding: 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-family: monospace;
      margin-bottom: 16px;
      resize: vertical;
    }
    
    .error-message {
      color: #dc3545;
      margin-bottom: 16px;
      font-size: 14px;
    }
  }
}

.visual-editor {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sitemap-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sitemap-row {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  margin-bottom: 30px;
  
  &.multi-node-row {
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
  }
}

.connector-vertical {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background-color: #aaa;
  z-index: 0;
}

.connector-horizontal {
  position: absolute;
  top: -15px;
  left: 20%;
  right: 20%;
  height: 2px;
  background-color: #aaa;
  z-index: 0;
}

.connector-sub {
  position: absolute;
  top: -15px;
  width: 80%;
  height: 2px;
  background-color: #aaa;
  z-index: 0;
  left: 10%;
}

.sitemap-node {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  max-width: 300px;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  
  &.selected {
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
  }
  
  &.root-node {
    background-color: #f0f0f0;
    margin-bottom: 20px;
    
    .node-header {
      background-color: #e0e0e0;
    }
  }
  
  &.child-node {
    .node-header {
      background-color: #f8f9fa;
    }
  }
  
  &.grandchild-node {
    .node-header {
      background-color: #f1f3f5;
    }
  }
  
  .node-header {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    
    i {
      margin-right: 6px;
      color: #666;
    }
  }
  
  .node-content {
    padding: 8px;
  }
}

.section-item {
  border: 1px solid #eee;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  
  &:hover {
    background-color: #f9f9f9;
  }
  
  &.selected {
    border-color: #4dabf7;
    background-color: #e7f5ff;
  }
  
  .section-title {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
  }
  
  .section-content {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.properties-panel {
  width: 320px;
  background-color: white;
  border-left: 1px solid #e0e0e0;
  
  .panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
    
    h3 {
      margin: 0;
      font-weight: 600;
      font-size: 16px;
      color: #333;
    }
  }
  
  .panel-content {
    padding: 20px;
  }
  
  .property-form {
    .form-group {
      margin-bottom: 16px;
      
      label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 14px;
        color: #555;
      }
      
      input, select, textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-family: inherit;
        font-size: 14px;
        
        &:focus {
          outline: none;
          border-color: #4dabf7;
          box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
        }
      }
      
      textarea {
        resize: vertical;
        min-height: 80px;
      }
    }
    
    .form-actions {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
    }
  }
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  
  &.primary {
    background-color: #4dabf7;
    color: white;
    
    &:hover {
      background-color: #339deb;
    }
    
    &:disabled {
      background-color: #adb5bd;
      cursor: not-allowed;
    }
  }
  
  &.secondary {
    background-color: #f1f3f5;
    border-color: #ddd;
    color: #555;
    
    &:hover {
      background-color: #e9ecef;
    }
  }
  
  &.sm {
    padding: 6px 12px;
    font-size: 13px;
  }
} */



/* by harsh */

/* visual-site-editor.component.scss */
.visual-editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: #f5f5f5;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  
  h2 {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
    color: #333;
  }
  
  .actions {
    display: flex;
    gap: 10px;
  }
}

.json-input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 32px;
  
  .card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    padding: 24px;
    
    h3 {
      margin-top: 0;
      margin-bottom: 16px;
      font-weight: 600;
      font-size: 16px;
      color: #333;
    }
    
    .json-textarea {
      width: 100%;
      height: 300px;
      padding: 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-family: monospace;
      margin-bottom: 16px;
      resize: vertical;
    }
    
    .error-message {
      color: #dc3545;
      margin-bottom: 16px;
      font-size: 14px;
    }
  }
}

.visual-editor {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0; /* Important to make flex child respect parent height */
}

.sitemap-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sitemap-row {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  margin-bottom: 30px;
  
  &.multi-node-row {
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
  }
}

.connector-vertical {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background-color: #aaa;
  z-index: 0;
}

.connector-horizontal {
  position: absolute;
  top: -15px;
  left: 20%;
  right: 20%;
  height: 2px;
  background-color: #aaa;
  z-index: 0;
}

.connector-sub {
  position: absolute;
  top: -15px;
  width: 80%;
  height: 2px;
  background-color: #aaa;
  z-index: 0;
  left: 10%;
}

.sitemap-node {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  max-width: 300px;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  
  &.selected {
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
  }
  
  &.root-node {
    background-color: #f0f0f0;
    margin-bottom: 20px;
    
    .node-header {
      background-color: #e0e0e0;
    }
  }
  
  &.child-node {
    .node-header {
      background-color: #f8f9fa;
    }
  }
  
  &.grandchild-node {
    .node-header {
      background-color: #f1f3f5;
    }
  }
  
  .node-header {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    
    i {
      margin-right: 6px;
      color: #666;
    }
  }
  
  .node-content {
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
  }
}

.section-item {
  border: 1px solid #eee;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  
  &:hover {
    background-color: #f9f9f9;
  }
  
  &.selected {
    border-color: #4dabf7;
    background-color: #e7f5ff;
  }
  
  .section-title {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
  }
  
  .section-content {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.properties-panel {
  width: 320px;
  background-color: white;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  
  .panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
    
    h3 {
      margin: 0;
      font-weight: 600;
      font-size: 16px;
      color: #333;
    }
  }
  
  .panel-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
  }
  
  .property-form {
    .form-group {
      margin-bottom: 16px;
      
      label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 14px;
        color: #555;
      }
      
      input, select, textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-family: inherit;
        font-size: 14px;
        
        &:focus {
          outline: none;
          border-color: #4dabf7;
          box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
        }
      }
      
      textarea {
        resize: vertical;
        min-height: 80px;
      }
      
      .section-type-input {
        display: flex;
        gap: 8px;
        margin-bottom: 8px;
        
        input {
          flex: 1;
        }
      }
    }
    
    .form-actions {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
    }
  }
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  
  &.primary {
    background-color: #4dabf7;
    color: white;
    
    &:hover {
      background-color: #339deb;
    }
    
    &:disabled {
      background-color: #adb5bd;
      cursor: not-allowed;
    }
  }
  
  &.secondary {
    background-color: #f1f3f5;
    border-color: #ddd;
    color: #555;
    
    &:hover {
      background-color: #e9ecef;
    }
  }
  
  &.sm {
    padding: 6px 12px;
    font-size: 13px;
  }
}

.json-output-container {
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  max-height: 30vh; /* Limit height to at most 30% of viewport height */
  min-height: 100px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  
  .card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 32px);
    
    h3 {
      margin-top: 0;
      margin-bottom: 12px;
      font-weight: 600;
      font-size: 16px;
      color: #333;
    }
    
    .json-output {
      width: 100%;
      padding: 12px;
      background-color: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-family: monospace;
      font-size: 14px;
      overflow-y: auto;
      white-space: pre-wrap;
      flex: 1;
    }
  }
}